Retriever upgrade#28
Merged
Merged
Conversation
…deration Implements comprehensive safety improvements including enhanced Cypher query validation with regex word boundaries, comment/string filtering to prevent false positives, dangerous APOC procedure detection, and LlamaGuard integration for input/output content moderation. Adds multi-layer security architecture with validation at input, query generation, and output stages.
Add OpenAI and OpenRouter API keys, embeddings model, and guardrail model configuration to .example.env and service configs for retriever and pusher services.
Update README to reflect the refactored architecture using tools pattern instead of agents pattern.
Remove deprecated agent files that have been replaced by the new tools-based architecture.
Add metrics tracking for monitoring component performance, latency, and token usage. Add pusher service embeddings functionality with migration script. Enhance Neo4j client with schema caching and APOC support. Improve retriever API endpoints with better error handling.
Update pyproject.toml for both retriever and pusher services with required dependencies.
Update uv.lock files for retriever and pusher services.
Ignore Claude Code artifacts directory.
Add empty line at beginning of test file per linter requirements.
Add SSE streaming endpoint compatible with frontend expectations, create event formatters to convert Neo4j data to frontend format (artist, tagline, venue, time, price), implement markdown formatting for chat display, support OpenAI-style streaming response format, maintain backward compatibility with legacy JSON endpoint. - formatters.py: Convert Neo4j events to frontend structure - api_sse.py: SSE streaming endpoint at /chat/stream - FRONTEND_INTEGRATION.md: Complete integration guide - test_formatting.py: Comprehensive formatting tests
Add LocationTool for proximity-based event queries with progressive radius expansion (5→30 km) and geo-spatial Neo4j filtering. Add InternetSearchTool that searches the web (Brave Search API) for live music events in parallel with the knowledge graph query. Uses LLM extraction to parse search results into structured event data. Results are labeled by source: "verified" (knowledge graph) and "internet" (web search), displayed distinctly in both markdown and frontend formats. KG results are prioritized in merged output. Update orchestrator ReAct loop with search_nearby action, parallel search execution via ThreadPoolExecutor, and source-aware prompts.
Signed-off-by: Oscar Arroyo Vega <103512255+OscarArroyoVega@users.noreply.github.com>
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.
Retriever Agent Upgrade
Summary
What changed
Agentic Architecture
Location-Aware Search
Parallel Internet Search
Safety & Quality
API & Streaming
Evals Framework
Infrastructure
Test plan