Find answers from the community

Updated 3 months ago

Can we generate document by providing

Can we generate document by providing some templates through llama-index in usage with OpenAI models?
L
B
5 comments
Do you have an example of what you want to do?
Suppose, user enters the prompt to generate a agreement for rent, then according to prefixed templates by us it generates that document.
I'm assuming there is a few fields in the template it needs to fill in right?

So there's two steps here

  1. Figuring out which template to use
  1. Actually filling it in
For 1), I think you could do some basic vector retrieval to narrow down the templates (if you have a lot), and then ask the LLM to pick which template to use based on a summary of each template?

For 2), you could use something like a pydantic program to just extract a structured object containing the finished blank fields from the template
Which query engine is perfect for this??
There's no single solution here, but I think I listed the ideas for tools above

1) a vector index/retriever

2) a pydantic program
Add a reply
Sign up and join the conversation on Discord