Repository navigation
Replace LLM response cache stub with VectorIndexManager integration and real embedding support - #238
Merged
Merged
Conversation
Co-authored-by: makr-code <[email protected]>
…ange pattern Co-authored-by: makr-code <[email protected]>
…edding generation Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
[WIP] Implement real LLM response cache with semantic similarity
Replace LLM response cache stub with VectorIndexManager integration
Jan 5, 2026
Owner
|
@copilot Prüfe auf doppelte Implementierung, stub, und production readyness. preview. gtest, gbenchmarks, dokumentation. |
…ks and docs Co-authored-by: makr-code <[email protected]>
Contributor
Author
✅ Überprüfung abgeschlossen (Commit 17bb01a) Keine doppelte Implementierung
Kein Stub mehr
Tests & Benchmarks
Dokumentation
Production Ready
|
…on handling Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
Replace LLM response cache stub with VectorIndexManager integration
Replace LLM response cache stub with VectorIndexManager integration and real embedding support
Jan 5, 2026
makr-code
marked this pull request as ready for review
January 5, 2026 15:55
6 tasks
8 of 25 tasks
7 tasks done
Copilot AI
added a commit
that referenced
this pull request
May 5, 2026
…tractive summarization, richer community report Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/a12af8d4-a476-45c7-a462-c993eeab0cfb Co-authored-by: makr-code <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The LLM response cache was using a stub implementation with simple string matching instead of semantic similarity via HNSW indexing.
Changes
Config::db_ptror creates own instance; enables zero-copy integration with ThemisDB coreEmbeddedLLM::embed()andLlamaWrapper::embed()via pointer exchange (Config::llm_ptr) instead of duplicating embedding generation codeConfig::embedding_fn), LLM embeddings, and simple feature-based fallbackmax_entriesreached; maintains sync betweenvector_index_andresponse_store_bench_llm_response_cache.cppwith 7 benchmark scenarios (put/get, semantic matching, LRU eviction, concurrent access)docs/en/llm/LLM_RESPONSE_CACHE_USAGE.mdwith examples and integration patternsImplementation
Key Points
EmbeddedLLM::embed()andLlamaWrapper::embed()via pointer exchangetest_llm_response_cache.cpp)model_idandmodel_usedfields preserved in BaseEntity storageTesting & Benchmarks
test_llm_response_cache.cpp(backward compatible)bench_llm_response_cache.cppwith 7 scenarios:Documentation
docs/en/llm/LLM_RESPONSE_CACHE_USAGE.mdNotes
Production deployments can now use real LLM embeddings by setting
config.llm_ptrto anEmbeddedLLMinstance, eliminating the need for feature-based embeddings and providing true semantic similarity.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.