Home / Class/ ContextQA Class — langchain Architecture

ContextQA Class — langchain Architecture

Architecture documentation for the ContextQA class in config.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  459c23bc_0314_ee87_74dd_163b63ba07ff["ContextQA"]
  5528a09f_3682_a8b0_958b_cd9a898b6e3c["SingleKeyEvalConfig"]
  459c23bc_0314_ee87_74dd_163b63ba07ff -->|extends| 5528a09f_3682_a8b0_958b_cd9a898b6e3c
  ba7f9415_541a_d99f_0400_a688a10212b0["config.py"]
  459c23bc_0314_ee87_74dd_163b63ba07ff -->|defined in| ba7f9415_541a_d99f_0400_a688a10212b0

Relationship Graph

Source Code

libs/langchain/langchain_classic/smith/evaluation/config.py lines 189–199

    class ContextQA(SingleKeyEvalConfig):
        """Configuration for a context-based QA evaluator.

        Attributes:
            prompt: The prompt template to use for generating the question.
            llm: The language model to use for the evaluation chain.
        """

        evaluator_type: EvaluatorType = EvaluatorType.CONTEXT_QA
        llm: BaseLanguageModel | None = None
        prompt: BasePromptTemplate | None = None

Frequently Asked Questions

What is the ContextQA class?
ContextQA is a class in the langchain codebase, defined in libs/langchain/langchain_classic/smith/evaluation/config.py.
Where is ContextQA defined?
ContextQA is defined in libs/langchain/langchain_classic/smith/evaluation/config.py at line 189.
What does ContextQA extend?
ContextQA extends SingleKeyEvalConfig.

Analyze Your Own Codebase

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

Try Supermodel Free