Hello Knowledge
This tutoral expands upon the Hello World example and adds a working example for importing knowledge using the ADK. This tutorial assumes that you have completed the ADK Hello World ADK tutorial.
In this tutoral you will:
-
Import knowlege using the ADK (using the embeded Milvus vector store)
-
Re-import the agent, using an updated agent file, specifying the knowledge source imported in step 1.
Import the knowledge
-
Download the example knowledge configuration file is located here and the PDF file located here into your 'demo' folder.
-
Import this knowledge file using the below command line
NOTE: It is important that the "IBM watsonx Orchestrate Doc.pdf" PDF file is in the same directory as the knowledge base configuration.
You should see an output as follows:
- Confirm that the knowledge base was installed by listing the existing knowledge bases
If you see a knowledge base with the name 'knowledge_base_for_agent_Hello_world', congratulations. It is time to update your agent to point to this new knowledgebase.
Re-import the agent
The following steps guild you through updating the "Hello World" agent with the new configuration. We will simply import the agent with the new configuration file.
-
Download the new agent configuration file from here
-
Import the agent configuration file with the following command
If you are updating an existing agent (e.g. the one you just imported in the previous tutorial), you should see the following message:
Congratulations! Your agent is updated with knowledge. You can verify that it works by logging into Watsonx Orchestrate and chatting with it.
Chat with the Agent
Now that you have built the agent, you can interact with it right there in the builder experience. Try typing "How do I work with Agents" and see that the response comes from the knowledge file you just uploaded.