Home / Function/ embed_query() — langchain Function Reference

embed_query() — langchain Function Reference

Architecture documentation for the embed_query() function in test_hyde.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ac059ee6_7663_73f2_90de_f1e094aa871c["embed_query()"]
  e1697692_0afb_1adc_ce1e_980922dcd4cd["FakeEmbeddings"]
  ac059ee6_7663_73f2_90de_f1e094aa871c -->|defined in| e1697692_0afb_1adc_ce1e_980922dcd4cd
  9003ea53_4573_7f07_5d43_4c307a9388de["test_hyde_from_llm()"]
  9003ea53_4573_7f07_5d43_4c307a9388de -->|calls| ac059ee6_7663_73f2_90de_f1e094aa871c
  f953368d_eb7b_b876_bb57_92ce45b05422["test_hyde_from_llm_with_multiple_n()"]
  f953368d_eb7b_b876_bb57_92ce45b05422 -->|calls| ac059ee6_7663_73f2_90de_f1e094aa871c
  style ac059ee6_7663_73f2_90de_f1e094aa871c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/chains/test_hyde.py lines 28–30

    def embed_query(self, text: str) -> list[float]:
        """Return random floats."""
        return list(np.random.default_rng().uniform(0, 1, 10))

Domain

Subdomains

Frequently Asked Questions

What does embed_query() do?
embed_query() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/chains/test_hyde.py.
Where is embed_query() defined?
embed_query() is defined in libs/langchain/tests/unit_tests/chains/test_hyde.py at line 28.
What calls embed_query()?
embed_query() is called by 2 function(s): test_hyde_from_llm, test_hyde_from_llm_with_multiple_n.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free