Agent Guidebook
Answer Questions

Question Answering

You can add the ability to answer questions to your agent. Not just from its LLM's background knowledge, but from specific information that you have given the agent access to.

This chapter will walk you through some common ways question-answering is added to agents:

What you can build with this chapter

Together with the Learning Chapter, this chapter will let you build:

  • An agent that answers questions about your PDFs or Books
  • An agent that answers questions about your YouTube channel
  • An agent that answers questions about facts you've uploaded via API
  • An agent that remembers specific things for its human users and can answer questions about them later

You can combine these skills with personalities to:

  • Adopt a socratic tone, acting as a tutor who gives some, but not all, of an answer
  • Acts like a character from a book, with knowledge from having learned the book
  • Acts like your favorite podcast host, with the ability to answer questions about specific interviews from having learned the YouTube videos
  • Acts as a friend who remembers your preferences and brings them up when chatting

You can combine these skills with image generation to:

  • Generate imagined pictures from books or PDFs
  • Fetch and send Google Image Search results relevant to an answer