aadd_example() — langchain Function Reference
Architecture documentation for the aadd_example() function in semantic_similarity.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 99e00c13_46c4_810f_2aad_79ef0d688a4c["aadd_example()"] a80787c0_fd68_ab68_1e5d_400de9d4457f["_VectorStoreExampleSelector"] 99e00c13_46c4_810f_2aad_79ef0d688a4c -->|defined in| a80787c0_fd68_ab68_1e5d_400de9d4457f 06f73539_fe12_1c9c_b0b0_60530c6bf341["_example_to_text()"] 99e00c13_46c4_810f_2aad_79ef0d688a4c -->|calls| 06f73539_fe12_1c9c_b0b0_60530c6bf341 style 99e00c13_46c4_810f_2aad_79ef0d688a4c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/example_selectors/semantic_similarity.py lines 81–94
async def aadd_example(self, example: dict[str, str]) -> str:
"""Async add new example to vectorstore.
Args:
example: A dictionary with keys as input variables
and values as their values.
Returns:
The ID of the added example.
"""
ids = await self.vectorstore.aadd_texts(
[self._example_to_text(example, self.input_keys)], metadatas=[example]
)
return ids[0]
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does aadd_example() do?
aadd_example() is a function in the langchain codebase, defined in libs/core/langchain_core/example_selectors/semantic_similarity.py.
Where is aadd_example() defined?
aadd_example() is defined in libs/core/langchain_core/example_selectors/semantic_similarity.py at line 81.
What does aadd_example() call?
aadd_example() calls 1 function(s): _example_to_text.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free