Skip to content

feat: Inject valid file paths into system prompt #93

Description

@ajianaz

Summary

Reduce hallucination by injecting actual diff file paths into the system prompt, with post-parse filtering of invalid file references. Referenced from old cora repo anti-hallucination patterns.

Accept Criteria

  • Extract file paths from diff before sending to LLM
  • Inject 'Valid files in this diff: [list]' into system prompt
  • Post-parse: filter out ReviewIssues where file path not in actual diff files
  • Log count of filtered invalid issues (debug level)
  • Unit test: prompt contains file paths
  • Unit test: issue with invalid file path gets filtered

Scope

llm.rs prompt building + parse post-processing

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions