[DEV-15167] implement recipient lookup tool#4683
Merged
Merged
Conversation
james-at-kc
marked this pull request as ready for review
July 1, 2026 12:13
zachflanders-frb
requested changes
Jul 7, 2026
zachflanders-frb
left a comment
Contributor
There was a problem hiding this comment.
I pulled this code down and tried it locally. The results seem good! I am requesting changes in order to
- use opensearchpy instead of elasticsearch_dsl library
- move the functions in recipient_retrieval into a helpers file in the tests directory
- Update the return value of the lookup tool to be a list of strings and remove the pydantic models from py_models (this one does not follow the pattern of the selectedLocations)
Additionally, it is my preference that we punt on the subcontractors lookup until later and potentially make it a separate tool, but would love others to weigh in on this too.
zachflanders-frb
approved these changes
Jul 13, 2026
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.
Description:
Search the recipients index in OpenSearch to find the most relevant results that can then be passed to the Advanced Search query. Cris may have insights from the filter semantic sessions for how to implement this filter.
Technical Details:
The lookup_recipient tool should look for matches on the following fields: recipient_name, uei, duns
The lookup_recipient tool returns a list of recipient names.
The tool should query the recipient OpenSearch index a single time to find a relevant match
Test cases are created to capture different scenarios for the filter, including the usage of fuzzy matching
Requirements for PR Merge:
Explain N/A in above checklist: