embed_query() — langchain Function Reference
Architecture documentation for the embed_query() function in fake_embeddings.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 4caf2596_8581_9dd2_f837_bc008110f9f5["embed_query()"] 34c0ffc0_c9e8_1d62_04cc_97e3117a2d22["FakeEmbeddings"] 4caf2596_8581_9dd2_f837_bc008110f9f5 -->|defined in| 34c0ffc0_c9e8_1d62_04cc_97e3117a2d22 68fed06a_94f4_a876_760e_60f129ad673f["aembed_query()"] 68fed06a_94f4_a876_760e_60f129ad673f -->|calls| 4caf2596_8581_9dd2_f837_bc008110f9f5 b86271bf_b4fe_f56c_d275_f88094a14a26["embed_query()"] b86271bf_b4fe_f56c_d275_f88094a14a26 -->|calls| 4caf2596_8581_9dd2_f837_bc008110f9f5 c9b4a85b_e27f_cf5b_9483_77f56e8e71a5["embed_query()"] c9b4a85b_e27f_cf5b_9483_77f56e8e71a5 -->|calls| 4caf2596_8581_9dd2_f837_bc008110f9f5 dce1cbf6_53f2_47fa_92e9_1221e0611d78["embed_documents()"] dce1cbf6_53f2_47fa_92e9_1221e0611d78 -->|calls| 4caf2596_8581_9dd2_f837_bc008110f9f5 b86271bf_b4fe_f56c_d275_f88094a14a26["embed_query()"] 4caf2596_8581_9dd2_f837_bc008110f9f5 -->|calls| b86271bf_b4fe_f56c_d275_f88094a14a26 60fce543_d0a8_8fd2_9f0d_08825daa878d["embed_documents()"] 4caf2596_8581_9dd2_f837_bc008110f9f5 -->|calls| 60fce543_d0a8_8fd2_9f0d_08825daa878d style 4caf2596_8581_9dd2_f837_bc008110f9f5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/chroma/tests/integration_tests/fake_embeddings.py lines 21–26
def embed_query(self, text: str) -> list[float]:
"""Return constant query embeddings.
Embeddings are identical to embed_documents(texts)[0].
Distance to each text will be that text's index,
as it was passed to embed_documents."""
return [1.0] * 9 + [0.0]
Domain
Subdomains
Source
Frequently Asked Questions
What does embed_query() do?
embed_query() is a function in the langchain codebase, defined in libs/partners/chroma/tests/integration_tests/fake_embeddings.py.
Where is embed_query() defined?
embed_query() is defined in libs/partners/chroma/tests/integration_tests/fake_embeddings.py at line 21.
What does embed_query() call?
embed_query() calls 2 function(s): embed_documents, embed_query.
What calls embed_query()?
embed_query() is called by 4 function(s): aembed_query, embed_documents, embed_query, embed_query.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free