Skip to content

Make RAG citation style configurable (global setting) #793

Closed

Description

@haiphucnguyen

Summary

MetadataAwareContentInjector (shared-jvm/src/main/kotlin/io/askimo/core/rag/MetadataAwareContentInjector.kt)
controls how source citations are formatted in RAG responses via CitationStyle
(MINIMAL / COMPACT / DETAILED). Today it's hardcoded to CitationStyle.COMPACT
in AiServiceBuilder.kt, with no way for users to change it. This issue proposes
exposing citation style as a global setting in Advanced Settings, consistent
with the existing useAbsolutePathInCitations toggle, rather than per-
ResourceCollection (collections can be mixed in a single query, and
ResourceCollection is a synced/read-only-for-team-managed domain model, not a
presentation preference).

Implementation sketch

  1. Add citationStyle: MetadataAwareContentInjector.CitationStyle = CitationStyle.COMPACT
    to RagConfig (shared-jvm/.../config/AppConfig.kt), next to useAbsolutePathInCitations.
  2. Wire it into AppConfig.updateRagField.
  3. Pass AppConfig.rag.citationStyle into MetadataAwareContentInjector(...) in
    AiServiceBuilder.kt.
  4. Add a dropdown UI control in AdvancedSettingsSection.kt (desktop-shared),
    following the same pattern as memoryConfigurationSection's mode dropdown,
    under a "RAG / Citations" subsection.

Files likely touched

  • shared-jvm/src/main/kotlin/io/askimo/core/config/AppConfig.kt
  • shared-jvm/src/main/kotlin/io/askimo/core/providers/AiServiceBuilder.kt
  • desktop-shared/src/main/kotlin/io/askimo/ui/settings/AdvancedSettingsSection.kt
  • localization strings for the new setting label/options

Activity

  1. added
    enhancement
    help wanted
    on Oct 31, 2026
  2. tomh539 commented on Nov 1, 2026

    @tomh539
    Contributor

    Hi @haiphucnguyen , I can take this task if no one has not yet

  3. haiphucnguyen commented on Nov 1, 2026

    @haiphucnguyen
    CollaboratorAuthor

    Hi @tomh539 , welcome onboard! Assigned it to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementhelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions