Don't expose reasoning traces in demo app search tool#30
Merged
johnymontana merged 2 commits intomainfrom Jan 25, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #28 by preventing reasoning traces and chat messages from appearing in podcast search results. The fix adds metadata and session ID filtering to ensure that domain search tools only return podcast content.
Changes:
- Added
metadata_filters={"source": "lenny_podcast"}tosearch_podcast_contentto filter vector search results - Added session ID prefix filtering (
WHERE c.session_id STARTS WITH 'lenny-podcast-') to three Cypher queries inget_entity_context,find_related_entities, andget_most_mentioned_entities - Added comprehensive unit and integration tests to verify the filtering behavior
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/lennys-memory/backend/src/agent/tools.py | Added metadata and session filters to 4 functions to prevent non-podcast content from being returned |
| examples/lennys-memory/backend/tests/test_tools.py | Added comprehensive unit tests verifying filter implementation for all modified tools |
| examples/lennys-memory/backend/tests/test_integration.py | Added integration tests validating end-to-end filtering behavior with real database |
| examples/lennys-memory/backend/tests/conftest.py | Added test fixtures including mock message factory, mock agent context, and real memory client for integration tests |
| examples/lennys-memory/backend/tests/init.py | Added test package initialization |
| examples/lennys-memory/backend/pyproject.toml | Added pytest dependencies and configuration including integration test markers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@johnymontana I've opened a new pull request, #31, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@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.
Fix #28