Comment by rahimnathwani

14 hours ago

I did something similar for structured text extraction. I added markers throughout each source document and then, for each piece of info I wanted, I asked the LLM to provide two separate fields:

  xyz
  xyz_citation

The latter was just the node number. So then my code could extract the exact snippet, instead of trusting the LLM to quote something verbatim.