Skip to content

RAG-04 | Precedent Injection #37

Description

@Manish281005

Task: RAG-04 | Precedent Injection

Estimated Hours: 1h | Owner: MK | Priority: P0 | Status: Completed

Definition:
Wire RAG retrieval output into draft generation prompt. Inject top-3 precedents as context to guide GPT-4o draft generation. Store precedent metadata in draft response for UI display (citations).

Acceptance Criteria:

  • Accepts {email: str, precedents: [{subject, snippet}]}
  • Injects into draft prompt: "Here are 3 similar emails you've sent: [subjects]. Use their tone/structure."
  • Draft response includes precedent_citations: [{email_id, subject, similarity}]
  • Graceful fallback if precedents empty (proceeds without)
  • No duplicate precedents in injection

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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