Update example config with citation annotation#1314
Conversation
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
WalkthroughA new annotation configuration section is added to the example run.yaml file under vector_stores, introducing enable_annotations and annotation_instruction_template fields to control source citation behavior in annotations. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan for PR comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/run.yaml`:
- Around line 166-171: The example adds vector_stores.annotation_prompt_params
which will be rejected by Configuration(**config_dict) because
src/models/config.py sets extra="forbid"; either remove that block from
examples/run.yaml or add corresponding fields to the Pydantic model used for
vector stores (e.g., extend the VectorStore/VectorStoreConfig model in
src/models/config.py with an optional annotation_prompt_params field and its
subfields like enable_annotations: bool and annotation_instruction_template:
str), update imports/typing, and run tests to ensure
Configuration(**config_dict) accepts the new keys.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bc2c68ee-ca02-4dc4-b640-47f41be8c892
📒 Files selected for processing (1)
examples/run.yaml
| annotation_prompt_params: # Override the default Llama Stack annotation that adds <| file-xyz |> to responses | ||
| enable_annotations: true | ||
| annotation_instruction_template: > | ||
| When appropriate, cite sources at the end of sentences using doc_url and doc_title format. | ||
| Citing sources is not always required because citations are handled externally. | ||
| Never include any citation that is in the form '<| file-id |>'. |
There was a problem hiding this comment.
This example config is invalid unless the schema grows with it.
src/configuration.py:95 loads YAML via Configuration(**config_dict), and src/models/config.py:38-41 sets extra="forbid". With that combination, this new vector_stores.annotation_prompt_params block will be rejected during config parsing unless the corresponding Pydantic model fields are added first. As written, the example can cause startup/config-load failure instead of documenting a supported option. Please either wire these fields into the config models in the same PR or remove them from the example until that support exists.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@examples/run.yaml` around lines 166 - 171, The example adds
vector_stores.annotation_prompt_params which will be rejected by
Configuration(**config_dict) because src/models/config.py sets extra="forbid";
either remove that block from examples/run.yaml or add corresponding fields to
the Pydantic model used for vector stores (e.g., extend the
VectorStore/VectorStoreConfig model in src/models/config.py with an optional
annotation_prompt_params field and its subfields like enable_annotations: bool
and annotation_instruction_template: str), update imports/typing, and run tests
to ensure Configuration(**config_dict) accepts the new keys.
Description
run.yamlwith an annotation override that prevents<| file-xyz |>style citations at the end of responses.Type of change
Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing
Summary by CodeRabbit