diff --git a/docs/concepts/knowledge.mdx b/docs/concepts/knowledge.mdx index ae854c2e6..2afb1b568 100644 --- a/docs/concepts/knowledge.mdx +++ b/docs/concepts/knowledge.mdx @@ -47,46 +47,12 @@ crew = Crew( tasks=[task], verbose=True, process=Process.sequential, - knowledge={"sources": [string_source], "metadata": {"preference": "personal"}}, # Enable knowledge by adding the sources here + knowledge={"sources": [string_source], "metadata": {"preference": "personal"}}, # Enable knowledge by adding the sources here. You can also add more sources to the sources list. ) result = crew.kickoff(inputs={"question": "What city does John live in and how old is he?"}) ``` -## Additionally: -You can add more sources as well as not need to re-declare the knowledge store every kickoff. -If you had sources from previous runs, you no longer need to declare the knowledge store. - -```python -from crewai import Agent, Task, Crew, Process, LLM - -# Create a knowledge store with a list of sources and metadata -llm = LLM(model="gpt-4o-mini", temperature=0) - # Create an agent with the knowledge store -agent = Agent( - role="About User", - goal="You know everything about the user.", - backstory="""You are a master at understanding people and their preferences.""", - verbose=True, - allow_delegation=False, - llm=llm, -) -task = Task( - description="Answer the following questions about the user: {question}", - expected_output="An answer to the question.", - agent=agent, -) - -crew = Crew( - agents=[agent], - tasks=[task], - verbose=True, - process=Process.sequential, - knowledge={"sources": [string_source], "metadata": {"preference": "personal"}}, # Enable knowledge by adding the sources here -) - -result = crew.kickoff(inputs={"question": "What city does John live in and how old is he?"}) -``` ## Embedder Configuration