Find answers from the community

Updated 3 months ago

When I pass an embedding model to the

When I pass an embedding model to the service context and that service context to query engine, I am just changing embeddings of the query, right? I am loading index form storage.
R
k
L
6 comments
service_context passed to a query_engine is used to determine which LLM to use to generate the response to query and for callback manager.

which embedding model to use for the query is determined by the service context used by the retriever as query_engine passes the query to the underlying retriever
so what does it mean when we pass embed model to the query engine. I am not passing any service context to the retriever as I am loading it from storage
I don't think we pass embed model to the query engine as it's not used there.

retriever uses the service context from the index . hence you don't need to pass it to the retriever.
Small correction -- the embedding model is used in the query engine, to embed queries

If you aren't passing any service context, it's using the default model (text-embedding-ada-002)
Add a reply
Sign up and join the conversation on Discord