llama-stack-mirror/tests/integration/responses
Francisco Javier Arceo 62005dc1a9
feat: Making static prompt values in Rag/File Search configurable in Vector Store Config (#4368)
# What does this PR do?

- Enables users to configure prompts used throughout the File Search /
Vector Retrieval
- Configuration is defined in the Vector Stores Config so they can be
modified at runtime
- Backwards compatible, which means the fields are optional and default
to the previously used values

This is the summary of the new options in the `run.yaml`
```yaml
vector_stores:
  file_search_params:
    header_template: 'knowledge_search tool found {num_chunks} chunks:\nBEGIN of knowledge_search tool results.\n'
    footer_template: 'END of knowledge_search tool results.\n'
  context_prompt_params:
    chunk_annotation_template: 'Result {index}\nContent: {chunk.content}\nMetadata: {metadata}\n'
    context_template: 'The above results were retrieved to help answer the user\'s query: "{query}". Use them as supporting information only in answering this query.{annotation_instruction}\n'
  annotation_prompt_params:
    enable_annotations: true
    annotation_instruction_template: 'Cite sources immediately at the end of sentences before punctuation, using `<|file-id|>` format like \'This is a fact <|file-Cn3MSNn72ENTiiq11Qda4A|>.\'. Do not add
extra punctuation. Use only the file IDs provided, do not invent new ones.'
    chunk_annotation_template: '[{index}] {metadata_text} cite as <|{file_id}|>\n{chunk_text}\n'
```

<!-- If resolving an issue, uncomment and update the line below -->
<!-- Closes #[issue-number] -->

## Test Plan
Added tests.

---------

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
2025-12-15 11:39:01 -05:00
..
fixtures fix(tests): add OpenAI client connection cleanup to prevent CI hangs (#4119) 2025-11-12 12:17:13 -05:00
recordings feat: Making static prompt values in Rag/File Search configurable in Vector Store Config (#4368) 2025-12-15 11:39:01 -05:00
__init__.py feat(tests): introduce a test "suite" concept to encompass dirs, options (#3339) 2025-09-05 13:58:49 -07:00
conftest.py feat(tests): enable MCP tests in server mode (#4146) 2025-11-13 07:23:23 -08:00
helpers.py feat(responses)!: improve responses + conversations implementations (#3810) 2025-10-15 09:36:11 -07:00
streaming_assertions.py feat(responses)!: add in_progress, failed, content part events (#3765) 2025-10-10 07:27:34 -07:00
test_basic_responses.py feat!: Implement include parameter specifically for adding logprobs in the output message (#4261) 2025-12-11 11:11:21 -08:00
test_conversation_responses.py fix: httpcore deadlock in CI by properly closing streaming responses (#4335) 2025-12-08 16:38:46 +01:00
test_file_search.py feat(tests): enable MCP tests in server mode (#4146) 2025-11-13 07:23:23 -08:00
test_mcp_authentication.py fix: MCP authorization parameter implementation (#4052) 2025-11-14 08:54:42 -08:00
test_tool_responses.py fix: Fix max_tool_calls for openai provider and add integration tests for the max_tool_calls feat (#4190) 2025-11-19 10:27:56 -08:00