embed_documents() — langchain Function Reference
Architecture documentation for the embed_documents() function in fake_embeddings.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 218a8f6a_437e_d56d_ff29_e09a7580dc3c["embed_documents()"] a9b72348_506f_5493_2bed_3c7187bdeb3b["FakeEmbeddings"] 218a8f6a_437e_d56d_ff29_e09a7580dc3c -->|defined in| a9b72348_506f_5493_2bed_3c7187bdeb3b c15879ea_35ed_8f30_50c1_9e571454241e["aembed_documents()"] c15879ea_35ed_8f30_50c1_9e571454241e -->|calls| 218a8f6a_437e_d56d_ff29_e09a7580dc3c a8f83580_6fa7_e492_af99_891414355e87["embed_documents()"] a8f83580_6fa7_e492_af99_891414355e87 -->|calls| 218a8f6a_437e_d56d_ff29_e09a7580dc3c e09c0307_07b6_4a15_0181_2e5eb5f2bd46["embed_documents()"] e09c0307_07b6_4a15_0181_2e5eb5f2bd46 -->|calls| 218a8f6a_437e_d56d_ff29_e09a7580dc3c 733cb1ae_2523_0406_3011_490a14d7cf8b["embed_query()"] 733cb1ae_2523_0406_3011_490a14d7cf8b -->|calls| 218a8f6a_437e_d56d_ff29_e09a7580dc3c f93aa4db_8c09_fdef_ef02_5d6b624f2c33["embed_query()"] f93aa4db_8c09_fdef_ef02_5d6b624f2c33 -->|calls| 218a8f6a_437e_d56d_ff29_e09a7580dc3c a8f83580_6fa7_e492_af99_891414355e87["embed_documents()"] 218a8f6a_437e_d56d_ff29_e09a7580dc3c -->|calls| a8f83580_6fa7_e492_af99_891414355e87 style 218a8f6a_437e_d56d_ff29_e09a7580dc3c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/integration_tests/cache/fake_embeddings.py lines 15–26
def embed_documents(self, texts: list[str]) -> list[list[float]]:
"""Return simple embeddings.
Embeddings encode each text as its index.
Args:
texts: List of text to embed.
Returns:
List of embeddings.
"""
return [[1.0] * 9 + [float(i)] for i in range(len(texts))]
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does embed_documents() do?
embed_documents() is a function in the langchain codebase, defined in libs/langchain/tests/integration_tests/cache/fake_embeddings.py.
Where is embed_documents() defined?
embed_documents() is defined in libs/langchain/tests/integration_tests/cache/fake_embeddings.py at line 15.
What does embed_documents() call?
embed_documents() calls 1 function(s): embed_documents.
What calls embed_documents()?
embed_documents() is called by 5 function(s): aembed_documents, embed_documents, 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