XMem icon indicating copy to clipboard operation
XMem copied to clipboard

Add low-latency raw search path separate from agentic answer synthesis

Open ishaanxgupta opened this issue 6 months ago • 6 comments

The retrieval uses LLM tool selection plus storage calls plus LLM synthesis in retrieval.py. This is quality-friendly but latency-heavy.

Acceptance criteria:

  • Add /search fast path returning ranked profile/summary/temporal/snippet/code hits without synthesis.
  • Make LLM answer generation optional via answer=true.
  • Cache profile catalogs and retrieval plans.
  • Track p50/p95/p99 latency per retrieval mode.

Bounty 5$ API Credits

ishaanxgupta avatar May 09 '26 10:05 ishaanxgupta

Opened PR #174 for this bounty: https://github.com/XortexAI/XMem/pull/174

It implements the raw search fast path with optional answer=true, profile/plan caching, latency snapshots, and includes the requested code domain in addition to profile/summary/temporal/snippet hits.

Happy to handle API credit / payout details privately after review.

michael-schvarcz avatar May 11 '26 18:05 michael-schvarcz

Opened PR #173 for this bounty: https://github.com/XortexAI/XMem/pull/173

Current head 5548b63 covers the raw /search fast path, optional answer=true synthesis, bounded profile/plan caches, p50/p95/p99 latency snapshots, and the requested code domain with repository/file/symbol metadata. It also now normalizes missing/non-finite backend scores and keeps healthy domain results if another requested domain fails. Current evidence: GitHub Actions label check passes; local full suite is 50 passed; targeted retrieval/API tests are 12 passed; touched-file Ruff and git diff --check are clean.

Update: GitHub Actions Test Suite is also green on PR #173: Unit, API, and Integration Tests and End-to-End Tests both passed on the current head, and the PR is mergeable with a clean merge state.

strongkeep-debug avatar May 12 '26 09:05 strongkeep-debug

Update on PR #174: https://github.com/XortexAI/XMem/pull/174

I pushed follow-up commit d2df805 after review:

  • normalized missing source scores before API serialization
  • made raw memory search resilient when one requested backend/domain fails
  • kept the bounded retrieval/profile caches and public answer/confidence helpers in the current branch

Validation:

  • targeted retrieval/API tests: 9 passed
  • git diff --check clean
  • current PR label check is green

michael-schvarcz avatar May 12 '26 13:05 michael-schvarcz

Bid: Add low-latency raw search path

What I'll deliver:

  • New /search fast path endpoint returning ranked results (profile/summary/temporal/snippet/code hits) without LLM synthesis
  • nswer=true query param to optionally enable LLM answer generation
  • Cache layer for profile catalogs and retrieval plans (Redis/disk)
  • p50/p95/p99 latency tracking per retrieval mode
  • Minimal disruption to existing retrieval pipeline

Timeline: 4-5 days from assignment

Why me: Built high-throughput search APIs with vector DBs and caching. Strong background in optimization and latency profiling.

Payment address: 0x6c21794E27C34E93cd0049918d04Da58FC72595c

laolaoqi avatar May 14 '26 05:05 laolaoqi

Opened PR #188 for this bounty: https://github.com/XortexAI/XMem/pull/188\n\nIt implements the low-latency /v1/memory/search raw path with ranked profile/temporal/summary/snippet/code results, optional answer=true synthesis, p50/p95/p99 latency snapshots, and short-lived profile catalog / retrieval-plan caches.\n\nValidation run locally:\n- .venv/bin/python -m pytest tests/api/test_dependencies_and_routes.py -> 6 passed\n- .venv/bin/python -m py_compile src/api/schemas.py src/api/routes/memory.py src/pipelines/retrieval.py tests/api/test_dependencies_and_routes.py\n\nHappy to handle API credit / bounty payout details privately after review.

Amhitox avatar May 20 '26 13:05 Amhitox

Opened replacement PR #194 for this bounty: https://github.com/XortexAI/XMem/pull/194

This replaces #189, which was closed accidentally and could not be reopened. The replacement branch includes the follow-up fixes from the code-assist review:

  • thread-safe latency sample snapshots
  • concurrent raw domain search execution with asyncio.gather
  • bounded profile catalog cache eviction

Validation:

  • pytest tests/api/test_dependencies_and_routes.py tests/unit/test_schemas.py -q -> 8 passed
  • python3 -m ruff check src/api/schemas.py src/api/routes/memory.py src/pipelines/retrieval.py tests/api/test_dependencies_and_routes.py -> passed

cnguyen14 avatar May 21 '26 17:05 cnguyen14