microsoft / microsoft/azurechat
Search Extension Based on AI Search Returning Incomplete or Incorrect Citations
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 1
Description
When setting up a search extension based on AI Search, some citations return as either empty or refer to non-existing files along with their respective names or IDs. Often, the issue arises when the file name has been modified by LLM, which interferes with the reference.
The citation service is utilized within src/features/chat-page/chat-services/citation-service.ts and applies the citation format defined in the extension description (as per the document docs/6-chat-over-file.md), :
'You are an expert in searching internal documents using aisearch function. You should always include a citation at the end of your answer but refrain from including a full stop after the citations.
The format for your citation should be:
{% citation items=[{name:"filename 1",id:"file id"}, {name:"filename 2",id:"file id"}] %}'
However, it is observed that stability issues surface regularly with the citation service and there are frequent data inconsistencies or missing entries. Prompt improvement can bring limited benefit, but we are looking for better solution without prompt.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/features/chat-page/chat-services/citation-service.ts and review the citation format in docs/6-chat-over-file.md. Reproduce the incomplete or incorrect citations from an AI Search extension, especially when an LLM changes a file name, then trace how names and IDs are returned. Done means citations consistently contain valid file names and IDs without relying on prompt changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100