llama-stack-mirror/docs/docs
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
..
advanced_apis feat: remove usage of build yaml (#4192) 2025-12-10 10:12:12 +01:00
api docs: Add comprehensive Files API and Vector Store integration doc (#3279) 2025-11-13 08:50:06 -05:00
api-deprecated docs: Add comprehensive Files API and Vector Store integration doc (#3279) 2025-11-13 08:50:06 -05:00
api-experimental docs: Add comprehensive Files API and Vector Store integration doc (#3279) 2025-11-13 08:50:06 -05:00
api-openai docs: Add comprehensive Files API and Vector Store integration doc (#3279) 2025-11-13 08:50:06 -05:00
building_applications docs: Adding initial updates to the RAG documentation and examples (#4377) 2025-12-12 22:59:39 -05:00
concepts docs: Add details on model registration and refresh_models (#4383) 2025-12-12 22:41:28 -05:00
contributing feat: remove usage of build yaml (#4192) 2025-12-10 10:12:12 +01:00
deploying feat: remove usage of build yaml (#4192) 2025-12-10 10:12:12 +01:00
distributions feat: remove usage of build yaml (#4192) 2025-12-10 10:12:12 +01:00
getting_started docs: make inference model configurable (#4385) 2025-12-15 11:02:28 +01:00
providers feat: Making static prompt values in Rag/File Search configurable in Vector Store Config (#4368) 2025-12-15 11:39:01 -05:00
references docs: Adding initial updates to the RAG documentation and examples (#4377) 2025-12-12 22:59:39 -05:00
api-overview.md docs: api separation (#3630) 2025-10-01 10:13:31 -07:00
index.mdx chore: update docs for telemetry api removal (#3900) 2025-10-24 13:57:28 -07:00