Skip to content

docs: add hybrid and keyword search references across documentation#264

Open
nkanu17 wants to merge 5 commits intomainfrom
pr/docs-hybrid-search-references
Open

docs: add hybrid and keyword search references across documentation#264
nkanu17 wants to merge 5 commits intomainfrom
pr/docs-hybrid-search-references

Conversation

@nkanu17
Copy link
Copy Markdown
Contributor

@nkanu17 nkanu17 commented Apr 2, 2026

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

  • Expand feature descriptions across all docs 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 showing which fields are indexed
  • Fix deprecated function reference in agent examples (get_working_memory to get_or_create_working_memory)
  • Fix tuple unpacking order in error handling example
  • Update search capability descriptions across all guides and READMEs

Files Changed (12)

  • README.md
  • docs/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.md
  • examples/README.md
  • agent-memory-client/README.md, agent-memory-client/agent-memory-client-js/README.md

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.

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

  • No code behavior changes in this PR
  • All changes are documentation and examples only
  • docs/mcp.md changes are intentionally in Part 2

Refs: #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_alpha examples in Python, JS/TS, and Java).

Fixes/refreshes a few examples to match current APIs (e.g., use get_or_create_working_memory and 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.

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
Copilot AI review requested due to automatic review settings April 2, 2026 22:11
@jit-ci
Copy link
Copy Markdown

jit-ci bot commented Apr 2, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. The documentation changes accurately reflect the server's search capabilities and are consistently applied across all files. No suggestions at this time.

@nkanu17
Copy link
Copy Markdown
Contributor Author

nkanu17 commented Apr 2, 2026

@codex review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_memory and 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.

Comment on lines +347 to +351
@@ -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")
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot review and validate this comment, if valid apply the changes based on this feedback

Comment on lines +7 to 11
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 |
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +347 to +351
@@ -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")
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

# Get only the 3 most recent messages
memory = await client.get_working_memory(
created, memory = await client.get_or_create_working_memory(
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
created, memory = await client.get_or_create_working_memory(
_created, memory = await client.get_or_create_working_memory(

Copilot uses AI. Check for mistakes.
nkanu17 and others added 3 commits April 3, 2026 10:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants