Skip to content

Store embeddings used in vector store's metadata #1210

Closed
@ahuang11

Description

@ahuang11

Was stumped as to why results were empty when querying the vector store and the issue was that when you embed it with OpenAIEmbeddings, you must remember to use the same embeddings when re-opening it.

import lumen.ai as lmai
import panel as pn

INSTRUCTIONS = """
You are an expert scientist working in Python, with a specialty using Anndata and Scanpy.
Help the user with their questions, and if you don't know the answer, say so.
"""

vector_store = lmai.vector_store.DuckDBVectorStore(
    uri="scanpy.db",
    embeddings=lmai.embeddings.OpenAIEmbeddings(),
)
doc_lookup = lmai.tools.VectorLookupTool(vector_store=vector_store, min_similarity=0.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions