Jupyter Notebook Integration
This example demonstrates how to build a lightweight GenAI testing framework using Corvic MCP and a Jupyter notebook. It reads structured test queries from a CSV file, invokes a Corvic-powered agent, and saves the responses alongside expected answers for comparison.Use Case
You want to automatically evaluate the output of a Corvic agent across a list of test questions with known expected answers. This is useful for regression testing, QA, and validation of LLM-based applications.Steps
-
Configure Corvic Agent Endpoint:
- Set
MCP_URLto your deployed Corvic agent’s endpoint. - Set the
HEADERSwith your Corvic API token.
- Set
-
Prepare the Input Dataset:
- Create a CSV file with at least the following columns:
id,question,expected_answer. - Set the
INPUT_CSV_PATHto the location of this CSV file.
- Create a CSV file with at least the following columns:
-
Configure Output:
- Set the
OUTPUT_PATHwhere the agent’s responses will be written as an Excel file.
- Set the
Input Format (CSV)
Output
An Excel file containing the following columns:idquestionexpected_answer(expected answer)response(from Corvic)
Code Example
Example Output
Resources
Python Integration
Learn more about the Python SDK.

