# (knowledge source) Failed to upsert documents: Expected Embedings to be non-empty list or numpy array, got \[\] in upsert

**URL:** <https://community.crewai.com/t/knowledge-source-failed-to-upsert-documents-expected-embedings-to-be-non-empty-list-or-numpy-array-got-in-upsert/4787>\
**Category:** CrewAI Community Support\
**Created:** [March 18, 2025, 4:36pm UTC](https://community.crewai.com/t/knowledge-source-failed-to-upsert-documents-expected-embedings-to-be-non-empty-list-or-numpy-array-got-in-upsert/4787 "2025-03-18T16:36:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sookinoby](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@sookinoby](https://community.crewai.com/u/sookinoby)\
**Post date:** [March 18, 2025, 4:36pm UTC](https://community.crewai.com/t/knowledge-source-failed-to-upsert-documents-expected-embedings-to-be-non-empty-list-or-numpy-array-got-in-upsert/4787/1 "2025-03-18T16:36:54Z")

</div>

from crewai import Agent, Crew, Process, Task, LLM  
from crewai.project import CrewBase, agent, crew, task  
from crewai\_tools import ScrapeWebsiteTool  
from dotenv import load\_dotenv  
import os  
from typing import Optional  
from crewai.knowledge.source.crew\_docling\_source import CrewDoclingSource

@CrewBase  
class Toolkit:  
“”“Toolkit crew for Customer Support”“”

```
agents_config = 'config/agents.yaml'
tasks_config = 'config/tasks.yaml'
user_query: Optional[str] = None

llm = LLM(
    model="ollama/gemma3:4b", # run !ollama list to see models you have
    temperature=0, 
    api_key=""
)
def __init__ (self):
    self.scapper_tool = ScrapeWebsiteTool("https://docs.console.elementai.com/")

    # Initialize CrewDoclingSource with storage
    self.content_source = CrewDoclingSource(
        file_paths=[
            "cli_reference_manual.html",
        ]
    )

@agent
def support_agent(self) -> Agent:
    return Agent(
        config=self.agents_config['support_agent'],
        verbose=True,
        llm=self.llm,
        embedder={
        "provider": "ollama",
        "config": {
            "model": "nomic-embed-text",
            "api_key": "ABCD",
            }
        }
    )

@agent
def question_answering_agent(self) -> Agent:
    return Agent(
        config=self.agents_config['question_answering_agent'],
        verbose=True,
        llm=self.llm,
        embedder={
        "provider": "ollama",
        "config": {
            "model": "nomic-embed-text",
            "api_key": "ABCD",
            }
        }
    )
@task
def support_agent_task(self) -> Task:
    return Task(
        config=self.tasks_config['support_agent_task'],
        agent=self.support_agent()
    )

@task
def question_answering_task(self) -> Task:
    return Task(
        config=self.tasks_config['question_answering_task'],
        agent=self.question_answering_agent(),
    )

@crew
def customer_support_crew(self) -> Crew:
    """Creates the Customer Support crew"""

    return Crew(
        agents=self.agents, # Automatically created by the @agent decorator
        tasks=self.tasks, # Automatically created by the @task decorator
        process=Process.sequential,
        verbose=True,
        knowledge_sources=[
            self.content_source
        ], 
        embedder={
        "provider": "ollama",
        "config": {
            "model": "nomic-embed-text",
            "api_key": "ABCD",
            }
        }
    )

```

I get this error  
Failed to upsert documents: Expected Embedings to be non-empty list or numpy array, got in upsert.

I am wondering how embedding model and gemma runs when I start crewai ? They should run on different ports right?

---

<div class="post-metadata">

**Author:** ![IMPERA78](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/impera78/32/3796_2.png) [@IMPERA78](https://community.crewai.com/u/IMPERA78)\
**Post date:** [June 12, 2025, 2:22pm UTC](https://community.crewai.com/t/knowledge-source-failed-to-upsert-documents-expected-embedings-to-be-non-empty-list-or-numpy-array-got-in-upsert/4787/2 "2025-06-12T14:22:50Z")

</div>

hello. did you solve this?
