Find answers from the community

Updated 8 months ago

Hey all.

Hey all.

How can I use Llama Index to get summarized answers based on data and also get like a list of top 3 items that summary is based on like so:

https://imgur.com/a/9uLmSxD
W
J
2 comments
You can get all this using the famous 5 line of code example:
https://docs.llamaindex.ai/en/stable/getting_started/starter_example/

You can optimize the prompt to provide answer in required format.
Now for showing the relevant source from which answer is generated, You can check the source nodes ( This contains the nodes which are used to form the final answer ).

Do this print(response.source_nodes) and you will find a list of nodes used to generate the answer. You can then show it in the format you want
Add a reply
Sign up and join the conversation on Discord