Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
6.15k stars 4.18k forks source link

Making citation for JSON and CSV more readable #1944

Open ZealinBee opened 2 months ago

ZealinBee commented 2 months ago

This issue is for a: (mark with an x)


- [ ] bug report -> please search issues before submitting

- [x] feature request

- [ ] documentation issue or request

- [ ] regression (a behavior that used to work and stopped in a new release)

The currently application allows the user to see the precise PDF page for citation, however, for JSON, it shows the entire JSON file without any highlight. For CSV it simply just downloads the relevant CSV to the user's laptop, not showing anything in the application, could there be a better way to cite JSON/CSV?

pamelafox commented 2 months ago

It'd be great if we could have better citation rendering for those formats without needing to bring in any additional packages. We already have react-syntax-highlighter for JSON (for our Thought Process tab), so we could theoretically use that for JSON citations. For CSV, we could perhaps also use that highlighter. We'd also need to change the mime-type, it sounds like.

Pull requests are welcome if you give it a go!