docs: add hybrid and keyword search references across documentation#264
docs: add hybrid and keyword search references across documentation#264
Conversation
Update all documentation and READMEs to consistently describe search as supporting semantic, keyword, and hybrid modes instead of only semantic. Changes: - Expand feature descriptions to include keyword and hybrid search - Add SDK usage examples (Python, TypeScript/JS, Java) for keyword and hybrid search modes - Add full-text indexing table to long-term memory docs - Fix deprecated function reference in agent examples - Fix tuple unpacking order in error handling example - Update search capability descriptions across all guides Context: The server already supports keyword (BM25) and hybrid (RRF) search modes via the search_mode parameter, but documentation only referenced semantic search. This brings docs in line with actual capabilities. Refs: #251, #253
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
|
@codex review |
There was a problem hiding this comment.
Pull request overview
Documentation-only update to align the project docs and SDK READMEs with the server’s existing support for semantic, keyword, and hybrid search modes, and to refresh examples to match current client APIs.
Changes:
- Expand documentation language to consistently describe semantic/keyword/hybrid search across guides and READMEs.
- Add keyword/hybrid search usage examples for TypeScript/JS and Java SDK docs (and Python client README).
- Update working-memory example code to use
get_or_create_working_memoryand correct tuple unpacking (created, memory).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates feature list + architecture diagram text to mention semantic/keyword/hybrid search. |
| examples/README.md | Updates example feature description to include keyword/hybrid search. |
| docs/use-cases.md | Updates best-practice guidance to reference all search modes. |
| docs/typescript-sdk.md | Adds keyword + hybrid search examples for the TS SDK. |
| docs/README.md | Updates the feature matrix row label to include semantic/keyword/hybrid search modes. |
| docs/quick-start.md | Updates quick-start narrative bullets to mention all search modes. |
| docs/long-term-memory.md | Updates long-term memory overview and adds keyword/hybrid sections + examples. |
| docs/java-sdk.md | Adds keyword + hybrid search examples for the Java SDK. |
| docs/index.md | Updates landing-page bullets to mention semantic/keyword/hybrid search. |
| docs/agent-examples.md | Updates example descriptions and fixes working-memory example to use get_or_create_working_memory. |
| agent-memory-client/README.md | Updates working-memory example to get_or_create_working_memory and adds keyword/hybrid search examples. |
| agent-memory-client/agent-memory-client-js/README.md | Adds keyword/hybrid search examples and clarifies default search mode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
agent-memory-client/README.md
Outdated
| @@ -333,9 +348,9 @@ from agent_memory_client.exceptions import ( | |||
| ) | |||
|
|
|||
| try: | |||
| memory = await client.get_working_memory("nonexistent-session") | |||
| except MemoryNotFoundError: | |||
| print("Session not found") | |||
| created, memory = await client.get_or_create_working_memory("nonexistent-session") | |||
There was a problem hiding this comment.
In this error-handling example, MemoryNotFoundError is still imported but is no longer used (the example now uses get_or_create_working_memory, which creates instead of raising not-found). Remove the unused import to avoid confusion for readers copying this snippet.
There was a problem hiding this comment.
@copilot review and validate this comment, if valid apply the changes based on this feedback
| Long-term memory provides persistent storage that survives server restarts and session expiration. It's optimized for semantic, keyword, and hybrid search, deduplication, and rich metadata to enable intelligent retrieval of relevant information. | ||
|
|
||
| | Feature | Details | | ||
| |---------|---------| | ||
| | **Scope** | Cross-session, persistent | |
There was a problem hiding this comment.
The updated overview/table emphasize keyword + hybrid search and full-text indexing, but the “Characteristics” list immediately below still says “Vector Indexed: Semantic search …”, which now reads as semantic-only. Consider updating that bullet to be search-mode-agnostic (or explicitly mention full-text + hybrid support) for internal consistency on this page.
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
Updated the "Vector Indexed" bullet in the Characteristics list to "Multi-Modal Search" which now reads: Semantic (vector), keyword (BM25 full-text), and hybrid search — configurable embeddings (OpenAI, Bedrock, Ollama, and more via LiteLLM). This makes it consistent with the table above which already mentioned all three search modes. Commit: ad27fb6.
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
agent-memory-client/README.md
Outdated
| @@ -333,9 +348,9 @@ from agent_memory_client.exceptions import ( | |||
| ) | |||
|
|
|||
| try: | |||
| memory = await client.get_working_memory("nonexistent-session") | |||
| except MemoryNotFoundError: | |||
| print("Session not found") | |||
| created, memory = await client.get_or_create_working_memory("nonexistent-session") | |||
There was a problem hiding this comment.
In this error-handling snippet, MemoryNotFoundError (and MemoryValidationError) are imported but not used, and MemoryNotFoundError is no longer applicable to the shown get_or_create_working_memory() call (it creates the session instead of raising not-found). Please either remove the unused imports or adjust the example to demonstrate the exceptions being imported.
docs/agent-examples.md
Outdated
|
|
||
| # Get only the 3 most recent messages | ||
| memory = await client.get_working_memory( | ||
| created, memory = await client.get_or_create_working_memory( |
There was a problem hiding this comment.
The example now unpacks created, memory = ... but never uses created. For clarity in docs (and to avoid encouraging unused variables), consider naming it _created/_ or adding a brief note/branch showing how to handle the created flag.
| created, memory = await client.get_or_create_working_memory( | |
| _created, memory = await client.get_or_create_working_memory( |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ng-term-memory.md Agent-Logs-Url: https://github.com/redis/agent-memory-server/sessions/539f5532-2543-4fb1-b7f9-00dedee6c543 Co-authored-by: nkanu17 <47899917+nkanu17@users.noreply.github.com>
- Remove unused MemoryNotFoundError import from error handling example (get_or_create_working_memory creates instead of raising not-found) - Add MemoryValidationError catch to error handling example - Use _created for unused variable in agent examples snippet
Summary
Update all documentation and READMEs to consistently describe search as supporting semantic, keyword, and hybrid modes instead of only semantic.
This is Part 1 of 2 PRs split from #251 to make review easier. This PR contains only documentation changes. Part 2 (core fix + MCP) builds on this branch.
Changes
get_working_memorytoget_or_create_working_memory)Files Changed (12)
README.mddocs/README.md,docs/index.md,docs/long-term-memory.md,docs/quick-start.md,docs/use-cases.md,docs/java-sdk.md,docs/typescript-sdk.md,docs/agent-examples.mdexamples/README.mdagent-memory-client/README.md,agent-memory-client/agent-memory-client-js/README.mdContext
The server already supports keyword (BM25) and hybrid (RRF) search modes via the
search_modeparameter, but documentation only referenced semantic search. This brings docs in line with actual capabilities.Per discussion on #251 (@vishal-bala, @abrookins, @tylerhutcherson, @nkanu17): MCP documentation for search modes is in Part 2 alongside the code changes, since MCP docs should stay coupled with the MCP implementation.
Review Notes
docs/mcp.mdchanges are intentionally in Part 2Refs: #251 (superseded by this PR and #265), #253 (tracking issue for remaining MCP/REST gaps)
Note
Low Risk
Docs-only changes that update examples and wording; low risk aside from potential confusion if any SDK/API names are misstated.
Overview
Updates documentation and SDK READMEs to consistently describe long-term memory search as supporting semantic, keyword, and hybrid modes (including new
search_mode/hybrid_alphaexamples in Python, JS/TS, and Java).Fixes/refreshes a few examples to match current APIs (e.g., use
get_or_create_working_memoryand correct tuple unpacking/error-handling snippets) and adjusts feature matrices/architecture diagrams to reflect the expanded search options.Written by Cursor Bugbot for commit 69765bb. This will update automatically on new commits. Configure here.