mindsdb icon indicating copy to clipboard operation
mindsdb copied to clipboard

[Bug]: Semantic Filter Not Returning Expected Results in knowledge base query

Open k0msenapati opened this issue 6 months ago • 0 comments

Short description of current behavior

When executing a semantic filter query using WHERE content = 'Breakfast', no results are returned. In contrast, filtering via metadata (category = 'Breakfast') works correctly.

Video or screenshots

https://github.com/user-attachments/assets/cfa84ee7-ed3e-406c-a3f1-10ef09c7075e

Expected behavior

The semantic filter (WHERE content = 'Breakfast') should return records

How to reproduce the error

Knowledge Base Creation query:

CREATE KNOWLEDGE_BASE mealsdb_kb
USING
    embedding_model = {
        "provider": "ollama",
        "model_name" : "nomic-embed-text",
        "base_url": "http://host.docker.internal:11434"
    },
    metadata_columns = ['name', 'area', 'category', 'image_url', 'youtube_url'],
    content_columns = ['text_chunk'],
    id_column = 'id';

Search query:

SELECT * FROM mealsdb_kb
WHERE category = 'Breakfast';

SELECT * FROM mealsdb_kb
WHERE content = 'Breakfast';

Anything else?

No response

k0msenapati avatar Jun 11 '25 13:06 k0msenapati