Conversation
Introduces a 'lean' mode to _repo_search_impl that strips debug/internal fields from search results for improved token efficiency, controlled by a parameter or LEAN_RESPONSES env var. Refactors hybrid_search to support thread-safe, per-request ReFRAG config using contextvars and explicit parameters, avoiding global env var mutation. Updates TOON formatting to support lean mode and omits results_json when lean is enabled. Also improves Neo4j graph 'toon' output to include metadata for consistency.
Introduces a new Helm chart for deploying the context-engine application, including templates for deployments, services, ingress, configmaps, autoscaling, and persistent storage. This chart enables configurable, production-ready Kubernetes deployment of the context-engine and its components such as Qdrant, MCP indexer/memory, upload service, watcher, and learning reranker worker.
🤖 Augment PR SummarySummary: Adds Kubernetes deployment support via a new Helm chart, and refines MCP tool outputs to be more token-efficient. Changes:
Technical Notes: The chart relies heavily on ConfigMaps for runtime config and defaults to exposing several services via NodePort; MCP output size is now influenced by 🤖 Was this summary useful? React with 👍 or 👎 |
scripts/hybrid_search.py
Outdated
| Returns empty dict if context_answer module not available or not in request context. | ||
| """ | ||
| try: | ||
| from scripts.mcp_impl.context_answer import get_refrag_config |
There was a problem hiding this comment.
|
|
||
| # Use injected lock or fall back to module-level lock | ||
| _lock = env_lock if env_lock is not None else _CA_ENV_LOCK | ||
| del env_lock # unused |
|
|
||
| # Determine if lean mode is enabled (strips debug/internal fields for agent ROI) | ||
| # Default ON for better agent token efficiency; set LEAN_RESPONSES=0 to disable | ||
| _lean = _to_bool(lean, os.environ.get("LEAN_RESPONSES", "1").lower() not in ("0", "false", "no")) |
| if isinstance(results, list): | ||
| # Preserve original list for internal callers before TOON encoding | ||
| response["results_json"] = results | ||
| # Only preserve results_json if not in lean mode (saves tokens for agents) |
| return _format_neo4j_graph_toon(response) | ||
| return { | ||
| "ok": True, | ||
| "result": _format_neo4j_graph_toon(response), |
Introduces scripts/analyze_intent_confidence.py for analyzing intent classification confidence from event logs, along with comprehensive tests in tests/test_analyze_intent_confidence.py. Updates repo_search and related functions to support a 'lean' argument for improved internal composition and testability. Increases INDEX_UPSERT_BATCH and CPU allocation in docker-compose.yml for better indexing performance. Refactors tests and context handling for improved reliability and clarity.
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.
Helm charts., Lean agent output