Agent knowledge base and history delete

Hello PhiData community,

I’m new to this field and currently working on creating a chatbot using PhiData for a website. I have a couple of questions and would greatly appreciate your help:

  1. How can I integrate a text file containing the website’s key fields and a brief description as the base knowledge for the agent? The goal is for the agent to verify whether a user’s query is related to the website or not.
  2. If the agent determines that the response is not related to the website, I want to delete the add_history to _response so the chat session resets and starts fresh.
  3. I am using ollama but I am noticing that the structured_output with ollama do not work well together.

Thank you in advance for your guidance! Any tips or examples would be incredibly helpful.

Hi @Dori
Thank you for reaching out and using Phidata! I’ve tagged the relevant engineers to assist you with your query. We aim to respond within 24 hours.
If this is urgent, please feel free to let us know, and we’ll do our best to prioritize it.
Thanks for your patience!

  1. Do you want to build a knowledgebase related to your website? Because you can look at this?
  2. You can just create a new instance of the agent. We will add a reset/clear method for this kind of behaviour in future.
  3. Which model are you using? Structured output doesn’t work well with all models. Check out this example.