Help with building an Q&A AI agent

Purpose:
To build a Q&A agent that can provide answers based on information uploaded to the vector database.

First workflow:


1. Extract information about elephants from Elephant | Description, Habitat, Scientific Names, Weight, & Facts | Britannica
2. Using Google Gemini models/embedding-001
3. Upload to Pinecone vector store.

Second workflow:

1. Ask a question via chat: “What color is an elephant?” (Using models/gemini-1.5.-flash)
2. Retrieve the answer from the Vector store (Using Google Gemini models/embedding-001).

Problem is that the chat response is that the tool doesn’t contain the answer to the question. How can I make the AI chat to understand the content of the vector store and provide the correct answer? What am I missing from the workflows?

1 Like

Hi @Elizabeth_Knutzen

Can you upload your workflow here? I’ve attached an image on how to do that. What are you putting in your system message, and what kind of files do you have in your vector store?

:sparkling_heart: If this helped you, click the heart to show it’s useful to others.

pasteworkflow

first workflow:

second workflow:

1 Like

Hi @Elizabeth_Knutzen

You need to add a system message so the agent knows its job. Here’s an image and a sample system message you can use.

:sparkling_heart: If this helped you, click the heart to show it’s useful to others.

@Elizabeth_Knutzen

I actually just tested it and it seems to be working ok. Are there questions you are asking that it is getting the wrong answer for?

Here’s a version with a system message telling the agent to only use the tool for info.

:sparkling_heart: If this helped you, click the heart to show it’s useful to others.
:white_check_mark: If this solved your issue, mark it as the solution to help the community.

@rbreen ,

Thank you for your help. I added the system message, but the agent didn’t seem to check the vector store for answers.

Does it matter which chat models to use? Is ChatGPT better in this scenario?

Thanks!

1 Like

@Elizabeth_Knutzen

Chatgpt may be better for it, I dont use gemini very much. Let me try it with that model and see if I can get it to work.

@Elizabeth_Knutzen

I tried it with gemini, and did some research on it. I’m finding that gemini isn’t very good at calling tools yet. I would recommending using openai. the 3.5 model is very cheap and should be able to work in your case.

@Elizabeth_Knutzen

I spoke too soon. I got your model to work using a question and answer node instead of an ai agent. This can be a good workaround if you need to use gemini.

:heart:If this response helped you, please click the heart to show that it is useful
:white_check_mark:If this response solved your issue, mark it as the solution to help the community

2 Likes

hi @rbreen can you please help me with my post… I am a student and need to configure it fast…

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.