I wanna pass data to gemini from my database using prisma beacuse I want the response to be from that data, but I do not know the correct way to do it.
Welcome to the forums!
This broadly is a Retrieval Augmented Generation (RAG) question.
The broad solution to this would be:
- Use Gemini to convert the user’s request to SQL
- Run the SQL query
- Use the original question, plus the results from the query, as another prompt to get the final results.
You can find plenty of articles about SQL-based RAG out there.
I have a brief example of this sort of thing in several of my presentations
Good luck!