context | question | answer |
---|---|---|
Francisco Rogers found the answer to a search query collar george herbert write my essay constitution research paper ideas definition essay humility … | Who found the answer to a search query collar george herbert essay? | Francisco Rogers found the answer to a search query collar george herbert essay. |
Game Notes EDM vs BUF Buffalo Sabres (Head Coach: Dan Bylsma) at Edmonton Oilers (Head Coach: Todd McLellan) NHL Game #31, Rogers Place, 2016-10-16 05:00:00PM (GMT -0600) … | Who were the three stars in the NHL game between Buffalo Sabres and Edmonton Oilers? | The three stars were Ryan O’Reilly, Brian Gionta, and Leon Draisaitl. |
RecursiveCharacterTextSplitter
or CharacterTextSplitter
.similarity
or mmr
(Maximal Marginal Relevance) search modesstuff
, map_reduce
, refine
or map_rerank
) to get final responses via OpenAI’s GPT-4o-mini.fi_instrumentation
SDK. This setup allows evaluation in real-time across the following metrics:
splitter_type
, chunk_size
)similarity
, mmr
)map_reduce
, stuff
, refine
, map_rerank
)output
: The generated response from the model.input
: The user-provided input to the model.output
is well-grounded in the input
output
: The output response generated by model.context
: The context provided to the model.input
: The user-provided input to the model.output
: The output response generated by model.context
: The context provided to the model.criteria
: Description of the criteria for evaluationeval_tags
list contains multiple instances of EvalTag
. Each EvalTag
represents a specific evaluation configuration to be applied during runtime, encapsulating all necessary parameters for the evaluation process.
Parameters of EvalTag
:
type
: Specifies the category of the evaluation tag. In this cookbook, EvalTagType.OBSERVATION_SPAN
is used.
value
: Defines the kind of operation the evaluation tag is concerned with.
EvalSpanKind.LLM
indicates that the evaluation targets operations involving Large Language Models.EvalSpanKind.TOOL
: For operations involving tools.eval_name
: The name of the evaluation to be performed.
EvalName.GROUNDEDNESS
,EvalName.CONTEXT_ADHERENCE
,EvalName.EVAL_CONTEXT_RETRIEVAL_QUALITY
config
: Dictionary for providing specific configurations for the evaluation. An empty dictionary means that default configuration parameters will be used.
mapping
: This dictionary maps the required inputs for the evaluation to specific attributes of the operation.
custom_eval_name
: A user-defined name for the specific evaluation instance.
trace_provider
, we need to pass following parameters to register
function:
project_type
: Specifies the type of project. In this cookbook, ProjectType.EXPERIMENT
is used since we are experimenting to find the best RAG setup before deploying in production. ProjectType.OBSERVE
is used to observe your AI application in production and measure the performance in real-time.project_name
: The name of the project. This is dynamically set from a configuration dictionary, config['future_agi']['project_name']
project_version_name**:
The version name of the project. Similar to project_name, this is also dynamically set from the configuration dictionary, config['future_agi']['project_version']
eval_tags
: A list of evaluation tags that define specific evaluations to be applied.instrument
method is called on the LangChainInstrumentor
instance. This method is responsible for setting up the instrumentation of the LangChain framework using the provided tracer_provider
.
Putting it all together, below is the function that configures eval_tags
, and sets up trace_provider
, which is then passed onto LangChainInstrumentor
instance.