Skip to content

Update example config with citation annotation#1314

Merged
tisnik merged 1 commit into
lightspeed-core:mainfrom
Jdubrick:update-config-examples
Mar 12, 2026
Merged

Update example config with citation annotation#1314
tisnik merged 1 commit into
lightspeed-core:mainfrom
Jdubrick:update-config-examples

Conversation

@Jdubrick

@Jdubrick Jdubrick commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Description

  • Updates example run.yaml with an annotation override that prevents <| file-xyz |> style citations at the end of responses.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: (e.g., Claude, CodeRabbit, Ollama, etc., N/A if not used) N/A
  • Generated by: (e.g., tool name and version; N/A if not used) N/A

Related Tickets & Documents

  • Related Issue # N/A
  • Closes # N/A

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

  • New Features
    • Annotation configuration is now available for vector stores, enabling users to toggle annotations and customize instruction templates that control how sources are cited in generated results.

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@coderabbitai

coderabbitai Bot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

A 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

Cohort / File(s) Summary
Configuration Update
examples/run.yaml
Added vector_stores.annotation_prompt_params with enable_annotations flag and annotation_instruction_template to specify citation behavior guidelines.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update example config with citation annotation' clearly and concisely describes the main change: adding citation annotation configuration to an example YAML file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan for PR comments
  • Generate coding plan

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 482ac5e and ddbc284.

📒 Files selected for processing (1)
  • examples/run.yaml

Comment thread examples/run.yaml
Comment on lines +166 to +171
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 |>'.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

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.

@tisnik tisnik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tisnik tisnik merged commit 69b9368 into lightspeed-core:main Mar 12, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants