Repository navigation
[tests] Cover OKP RAG retrieval through /v1/responses - #23
malingatembo wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
Run the two vm questions throught the /v1/responses API and inspect the file-search results. All earlier checks are kept Related-Issue: OSPRH-40177 Signed-off-by: malingatembo <tembomalinga@gmail.com>
23ad2c5 to
1a1b2dd
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: malingatembo The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| "tool_choice": {"type": "file_search"}, | ||
| "include": ["file_search_call.results"], |
There was a problem hiding this comment.
Issue (blocking): Since lightspeed-core/lightspeed-stack#3255 has been merged then after we merge openstack-k8s-operators/lightspeed-operator#163, this will no longer work. LCS now strips server-managed file_search_call items from the /v1/responses output whenever the request doesn't declare a file_search tool in tools ... tool_choice and include don't change that. You can force the presence by specifying file_search in tools.
Additionally, this is not how Goose queries lightspeed-stack via the /v1/responses API. The aim here is to emulate Goose request as closely as possible. Here's a thing we could explore:
🤖 Generated with the help of AI (not 100 % guaranteed to work but worth of exploring in this direction)
- Send the request with
"store": true(notools, notool_choice, noinclude— the response body won't contain the file search results either way, since they're sanitized out). - Query
/v2/conversations/{conversation_id}(the ID comes back in the response'sconversationfield). The turn is persisted before sanitization, so it records what really happened in the background:tool_calls— contains afile_searchentry (name: "file_search",args.queries) iff the model actually performed retrieval;referenced_documentson the assistant message — the deduplicated list of retrieved docs with fulldoc_urls (LCS builds these fromsource_path/reference_urlchunk attributes), which is what the OpenStack-docs-present / no-virtualization-book assertions should run against.
Fix the OKP filter test to read URLs from
referenced_documentsinstead of chunk attributes, and validate decoded document paths.Related-Issue: OSPRH-40177