crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

[BUG] Latest data is not getting picked up from Agent specific Knowledge (CSV) source

Open anupmanekar opened this issue 8 months ago • 2 comments

Description

I am updating the data in CSV knowledge source but its agent is not picking it on next run. It is picking the old data.

Steps to Reproduce

  1. Create CSV data file and add it in knowledge folder.
  2. Configure it as knowledge source for Agent
   csv_source = CSVKnowledgeSource(file_paths=["referral_data_details.csv"])
   @agent
   def healthcare_professional(self) -> Agent:
       return Agent(
			config=self.agents_config['healthcare_professional'],
			verbose=True,
			llm=gemini_llm,
			max_iter=1,
			max_retry_limit=0,
           tools=[run_browser_use_tool],
			knowledge_sources=[self.csv_source, self.txt_source, self.json_source],
			embedder= {
			"provider": "google",
				"config": {
					"model": "models/text-embedding-004",
					"api_key": GEMINI_API_KEY,
				}
			},
		)
  1. Run command line - crewai run. It picks up the correct data
  2. Change the first line in CSV to fetch new data
  3. Run command line again. But it still fetches the old data

Expected behavior

It should fetch the latest data

Screenshots/Code snippets

Old Data

Image

New Data

Image

** Logs **

# Agent: Healthcare Professional
## Task: Extract following data from knowledge sources: referral_id, mrn, ssn, address1, address2, city, state, work_phone. Now using above data and workflow_type as "edit_referral", invoke "Run Browser Use Tool" to edit the referral details. After the task is completed, the system should return the values entered in json format.

🤖 Agent: Healthcare Professional

    Status: In Progress
└── 🧠 Thinking...

🤖 Agent: Healthcare Professional

    Status: In Progress

🤖 Agent: Healthcare Professional

    Status: In Progress

Running browser use tool with steps: 
1. Enter **MRN817362111** in MRN field
2. Enter **987-65-4321** in SSN field

Operating System

macOS Sonoma

Python Version

3.11

crewAI Version

0.114

crewAI Tools Version

0.114

Virtual Environment

Venv

Evidence

Given above

Possible Solution

Not sure

Additional context

I have tried resetting memory through crewai reset-memories --knowledge, it displays An unexpected error occurred: No crew found.

I think since my source is agent specific, the clearing is not allowed.

anupmanekar avatar May 05 '25 23:05 anupmanekar

Hi @anupmanekar, For the not able to clear the agent specific knowledge.

I think you are quite correct, will try to patch this up.

For the second issue, No crew found I think If you can upgrade the crewai vesion pip install crewai==0.118.0. I think this would solve this issue.

Vidit-Ostwal avatar May 06 '25 03:05 Vidit-Ostwal

Thanks @Vidit-Ostwal !

anupmanekar avatar May 07 '25 02:05 anupmanekar