Skip to content

[BUG] Duplicate citations for same file reference #7

@jbencina

Description

@jbencina

Describe the bug
OpenAI assistant may find multiple references in the same file. However we currently just support a single file reference. This causes an issue where we may see [1][1] in the output.

5. **Output Generation**: The final output for each input element is computed as a weighted sum of the value vectors, using the attention weights. This produces an output that reflects the relevant contexts derived from all elements in the sequence[1][1].

To Reproduce
Generate a message which cites multiple sections of the same document

Expected behavior
There should be a single document-level citation for a chunk of text

Environment

  • OS: All
  • Version 0.5.0

Additional context / Screenshots
This is a little tricky to resolve because we only see one at a time during streaming. We only see this after the text has been collected. Using regex may have unintended consequences. May need to explore more advanced processing in the stream handler.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions