3 ms·
This is interesting. I've been doing this using GPT-4o-mini by numbering paragraphs in the source context, and asking the model to give me a number as the citat
by rahimnathwani 2y ago
This is interesting. I've been doing this using GPT-4o-mini by numbering paragraphs in the source context, and asking the model to give me a number as the citation. That:
- doesn't require me to trust the citations are reproduced faithfully, as I can retrieve them from the original using the reference number, and
- doesn't use as many output tokens as asking the model to provide the text of the citation.
- d4rkp4ttern 2y agoThis is exactly what we have had working in Langroid since at least a year, so I don't quite get the buzz around this. Langroid's `DocChatAgent` produces granular markdown-style citations, and works with practically any (good enough) LLM. E.g. try running this example script on the DeepSeek R1 paper: https://github.com/langroid/langroid/blob/main/examples/docqa/chat.py https://github.com/langroid/langroid/blob/main/examples/docq... uv run examples/docqa/chat.py https://arxiv.org/pdf/2501.12948 Sample output here: https://gist.github.com/pchalasani/0e2e54cbc3586aba60046b6212d12ad4 https://gist.github.com/pchalasani/0e2e54cbc3586aba60046b621... https://gist.github.com/pchalasani/0e2e54cbc3586aba60046b6212d12ad4 https://gist.github.com/pchalasani/0e2e54cbc3586aba60046b621...