microsoft / microsoft/azurechat

Search Extension Based on AI Search Returning Incomplete or Incorrect Citations

Open
#347 0 comments 5 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.