SYMBOL INDEX (3233 symbols across 332 files) FILE: docs/_static/js/header_border.js function applyBorders (line 15) | function applyBorders() { FILE: docs/_static/js/mendable_chat_bubble.js function loadScript (line 2) | function loadScript(src, callback) { FILE: docs/alfred.py function get_files (line 17) | def get_files(path: str, ext: str) -> list: function load_docs (line 21) | def load_docs(path: str) -> t.List[File]: function fix_doc_with_llm (line 31) | async def fix_doc_with_llm(doc: File, llm: BaseChatModel) -> File: function main (line 51) | async def main(docs: t.List[File], llm: BaseChatModel): FILE: docs/ipynb_to_md.py function convert_ipynb_to_md (line 6) | def convert_ipynb_to_md(ipynb_file): function get_last_modified_time (line 32) | def get_last_modified_time(file_path): function find_and_convert_ipynb_files (line 36) | def find_and_convert_ipynb_files(directory): function get_valid_directory (line 59) | def get_valid_directory(use_default=False): FILE: examples/gdrive_append_example.py class EvaluationRecord (line 13) | class EvaluationRecord(BaseModel): function append_to_existing_dataset (line 21) | def append_to_existing_dataset(): function create_multiple_datasets (line 98) | def create_multiple_datasets(): FILE: examples/gdrive_backend_example.py class EvaluationRecord (line 31) | class EvaluationRecord(BaseModel): function example_usage (line 39) | def example_usage(): FILE: examples/iterate_prompt/evals.py function labels_exact_match (line 17) | def labels_exact_match(prediction: str, expected_labels: str): function priority_accuracy (line 45) | def priority_accuracy(prediction: str, expected_priority: str): function support_triage_experiment (line 69) | async def support_triage_experiment(row, prompt_file: str, experiment_na... function load_dataset (line 108) | def load_dataset(): function compare_inputs_to_output (line 142) | def compare_inputs_to_output( function run_command (line 250) | async def run_command(prompt_file: str, name: Optional[str]) -> None: function compare_command (line 291) | def compare_command(inputs: List[str], output: Optional[str]) -> None: function build_parser (line 296) | def build_parser() -> argparse.ArgumentParser: FILE: examples/iterate_prompt/run_prompt.py function load_prompt (line 8) | def load_prompt(prompt_file: str) -> str: function run_prompt (line 14) | async def run_prompt(ticket_text: str, prompt_file: str = "promptv1.txt"): FILE: examples/oci_genai_example.py function main (line 21) | def main(): function test_llm_connection (line 94) | def test_llm_connection(): FILE: examples/ragas_examples/ag_ui_agent_experiments/experiments.py function load_scientist_dataset (line 64) | def load_scientist_dataset() -> Dataset: function load_weather_dataset (line 84) | def load_weather_dataset() -> Dataset: function create_evaluator_components (line 104) | def create_evaluator_components(model_name: str): function run_scientist_experiment (line 120) | async def run_scientist_experiment( function run_tool_experiment (line 226) | async def run_tool_experiment(endpoint_url: str, evaluator_model: str) -... function main (line 321) | async def main(): FILE: examples/ragas_examples/agent_evals/agent.py class TraceEvent (line 24) | class TraceEvent: class ToolResult (line 35) | class ToolResult: class MathToolsAgent (line 42) | class MathToolsAgent: method __init__ (line 43) | def __init__( method add (line 146) | def add(self, a: float, b: float) -> float: method sub (line 152) | def sub(self, a: float, b: float) -> float: method mul (line 157) | def mul(self, a: float, b: float) -> float: method div (line 162) | def div(self, a: float, b: float) -> float: method _execute_tool_call (line 169) | def _execute_tool_call(self, tool_call) -> str: method export_traces_to_log (line 210) | def export_traces_to_log( method solve (line 242) | def solve( function get_default_agent (line 392) | def get_default_agent( FILE: examples/ragas_examples/agent_evals/evals.py function correctness_metric (line 11) | def correctness_metric(prediction: float, actual: float): function load_dataset (line 21) | def load_dataset(): function run_experiment (line 48) | async def run_experiment(row): function main (line 69) | async def main(): FILE: examples/ragas_examples/benchmark_llm/evals.py function discount_accuracy (line 23) | def discount_accuracy(prediction: str, expected_discount): function benchmark_experiment (line 42) | async def benchmark_experiment(row, model_name: str): function load_dataset (line 69) | def load_dataset(): function compare_inputs_to_output (line 81) | def compare_inputs_to_output( function run_command (line 187) | async def run_command(model: str, name: Optional[str]) -> None: function compare_command (line 220) | def compare_command(inputs: List[str], output: Optional[str]) -> None: function build_parser (line 225) | def build_parser() -> argparse.ArgumentParser: FILE: examples/ragas_examples/benchmark_llm/prompt.py function get_client (line 12) | def get_client() -> AsyncOpenAI: function run_prompt (line 45) | async def run_prompt(prompt: str, model: str = DEFAULT_MODEL): function main (line 63) | async def main(): FILE: examples/ragas_examples/improve_rag/evals.py function download_and_save_dataset (line 41) | def download_and_save_dataset() -> Path: function create_ragas_dataset (line 66) | def create_ragas_dataset(dataset_path: Path) -> Dataset: function construct_mlflow_trace_url (line 83) | def construct_mlflow_trace_url(trace_id: str, mlflow_host: str = "http:/... function evaluate_rag (line 126) | async def evaluate_rag(row: Dict[str, Any], rag: RAG, llm) -> Dict[str, ... function run_experiment (line 173) | async def run_experiment(mode: str = "naive", model: str = "gpt-4o-mini"... FILE: examples/ragas_examples/improve_rag/rag.py class BM25Retriever (line 30) | class BM25Retriever: method __init__ (line 33) | def __init__(self, dataset_name="m-ric/huggingface_doc", default_k=3): method _build_retriever (line 37) | def _build_retriever(self, dataset_name: str) -> LangchainBM25Retriever: method retrieve (line 77) | def retrieve(self, query: str, top_k: int = None): class RAG (line 85) | class RAG: method _check_mlflow_server (line 89) | def _check_mlflow_server(uri: str = "http://127.0.0.1:5000", timeout: ... method __init__ (line 99) | def __init__(self, llm_client: AsyncOpenAI, retriever: BM25Retriever, ... method _setup_agent (line 121) | def _setup_agent(self): method _naive_query (line 145) | async def _naive_query(self, question: str, top_k: int) -> Dict[str, A... method _agentic_query (line 172) | async def _agentic_query(self, question: str, top_k: int) -> Dict[str,... method query (line 194) | async def query(self, question: str, top_k: Optional[int] = None) -> D... function main (line 218) | async def main(): FILE: examples/ragas_examples/judge_alignment/evals.py function load_dataset (line 100) | def load_dataset(csv_path: Optional[Path] = None) -> Dataset: function judge_alignment (line 122) | def judge_alignment(judge_label: str, human_label: str) -> MetricResult: function judge_experiment (line 134) | async def judge_experiment( function main (line 167) | async def main(): function main_v2 (line 194) | async def main_v2(): FILE: examples/ragas_examples/llamaIndex_agent_evals/evals.py function tool_call_accuracy_metric (line 30) | def tool_call_accuracy_metric( function goal_accuracy_metric_without_llm (line 80) | def goal_accuracy_metric_without_llm(current_state: Dict, expected_state... function load_dataset (line 142) | def load_dataset(): function run_experiment (line 227) | async def run_experiment(row): function main (line 285) | async def main(): FILE: examples/ragas_examples/llamaIndex_agent_evals/llamaindex_agent.py function add_item (line 9) | async def add_item(ctx: Context, item: str) -> str: function remove_item (line 19) | async def remove_item(ctx: Context, item: str) -> str: function list_items (line 30) | async def list_items( FILE: examples/ragas_examples/prompt_evals/evals.py function my_metric (line 9) | def my_metric(prediction: str, actual: str): function run_experiment (line 19) | async def run_experiment(row): function load_dataset (line 31) | def load_dataset(): function main (line 65) | async def main(): FILE: examples/ragas_examples/prompt_evals/prompt.py function run_prompt (line 14) | def run_prompt(prompt: str): FILE: examples/ragas_examples/rag_eval/evals.py function load_dataset (line 20) | def load_dataset(): function run_experiment (line 59) | async def run_experiment(row): function main (line 77) | async def main(): FILE: examples/ragas_examples/rag_eval/rag.py class TraceEvent (line 19) | class TraceEvent: class BaseRetriever (line 27) | class BaseRetriever: method __init__ (line 33) | def __init__(self): method fit (line 36) | def fit(self, documents: List[str]): method get_top_k (line 40) | def get_top_k(self, query: str, k: int = 3) -> List[tuple]: class SimpleKeywordRetriever (line 45) | class SimpleKeywordRetriever(BaseRetriever): method __init__ (line 48) | def __init__(self): method _count_keyword_matches (line 51) | def _count_keyword_matches(self, query: str, document: str) -> int: method get_top_k (line 61) | def get_top_k(self, query: str, k: int = 3) -> List[tuple]: class ExampleRAG (line 75) | class ExampleRAG: method __init__ (line 83) | def __init__( method add_documents (line 131) | def add_documents(self, documents: List[str]): method set_documents (line 163) | def set_documents(self, documents: List[str]): method retrieve_documents (line 196) | def retrieve_documents(self, query: str, top_k: int = 3) -> List[Dict[... method generate_response (line 254) | def generate_response(self, query: str, top_k: int = 3) -> str: method query (line 339) | def query( method export_traces_to_log (line 413) | def export_traces_to_log( function default_rag_client (line 442) | def default_rag_client(llm_client, logdir: str = "logs") -> ExampleRAG: FILE: examples/ragas_examples/text2sql/analyze_errors.py function get_error_analysis (line 34) | def get_error_analysis(client: OpenAI, row: Dict[str, Any]) -> Dict[str,... function analyze_errors (line 76) | def analyze_errors(input_file: str, output_file: str) -> None: function main (line 142) | def main(): FILE: examples/ragas_examples/text2sql/data_utils.py function download_booksql_dataset (line 56) | def download_booksql_dataset() -> bool: function validate_query_data (line 120) | def validate_query_data(query_data: Dict[str, Any], require_data: bool =... function load_and_clean_data (line 149) | def load_and_clean_data(input_file: str) -> DataFrame: function sample_by_difficulty (line 199) | def sample_by_difficulty(data: DataFrame, level: str, samples_per_level:... function validate_samples (line 227) | def validate_samples(data: DataFrame, level: str, samples_per_level: int, function save_results (line 286) | def save_results(data: DataFrame, output_dir: str, output_filename: str,... function create_sample_dataset (line 330) | def create_sample_dataset( function main (line 399) | def main(): FILE: examples/ragas_examples/text2sql/db_utils.py class SQLiteDB (line 22) | class SQLiteDB: method __init__ (line 33) | def __init__(self, db_path: Optional[str] = None): method connect (line 48) | def connect(self) -> Tuple[bool, str]: method disconnect (line 66) | def disconnect(self) -> None: method execute_query (line 72) | def execute_query(self, sql: str, replace_current_date: bool = True, c... method _normalize_sql (line 112) | def _normalize_sql(self, sql: str, replace_current_date: bool, case_in... method get_schema_info (line 141) | def get_schema_info(self) -> Tuple[bool, Union[pd.DataFrame, str]]: method get_table_names (line 158) | def get_table_names(self) -> Tuple[bool, Union[list, str]]: function execute_sql (line 180) | def execute_sql(sql: str, db_path: Optional[str] = None, replace_current... function get_database_schema (line 209) | def get_database_schema(db_path: Optional[str] = None) -> Tuple[bool, Un... function main (line 226) | def main(): FILE: examples/ragas_examples/text2sql/evals.py function execution_accuracy (line 32) | def execution_accuracy(expected_sql: str, predicted_success: bool, predi... function text2sql_experiment (line 127) | async def text2sql_experiment( function load_dataset (line 167) | def load_dataset(limit: Optional[int] = None): function main (line 192) | async def main(): FILE: examples/ragas_examples/text2sql/text2sql_agent.py class Text2SQLAgent (line 21) | class Text2SQLAgent: method __init__ (line 30) | def __init__( method query (line 56) | async def query(self, question: str) -> Dict[str, Any]: function main (line 103) | async def main(): FILE: examples/ragas_examples/text2sql/validate_sql_dataset.py function load_dataset (line 28) | def load_dataset(csv_path: str = "datasets/booksql_sample.csv") -> List[... function execute_and_validate_query (line 58) | def execute_and_validate_query(query_data: Dict[str, Any]) -> Dict[str, ... function generate_summary_statistics (line 136) | def generate_summary_statistics(results: List[Dict[str, Any]]) -> Dict[s... function main (line 218) | def main(): FILE: examples/ragas_examples/workflow_eval/evals.py function load_dataset (line 16) | def load_dataset(): function run_experiment (line 80) | async def run_experiment(row): function main (line 98) | async def main(): FILE: examples/ragas_examples/workflow_eval/workflow.py class TraceEvent (line 14) | class TraceEvent: class ExtractionMode (line 24) | class ExtractionMode(Enum): class BaseExtractor (line 31) | class BaseExtractor(ABC): method extract (line 35) | def extract(self, email_content: str, category: str) -> Dict[str, Opti... class DeterministicExtractor (line 40) | class DeterministicExtractor(BaseExtractor): method extract (line 43) | def extract(self, email_content: str, category: str) -> Dict[str, Opti... method _extract_bug_info (line 56) | def _extract_bug_info(self, email_content: str) -> Dict[str, Optional[... method _extract_billing_info (line 69) | def _extract_billing_info(self, email_content: str) -> Dict[str, Optio... method _extract_feature_info (line 87) | def _extract_feature_info(self, email_content: str) -> Dict[str, Optio... class LLMExtractor (line 145) | class LLMExtractor(BaseExtractor): method __init__ (line 148) | def __init__(self, client: OpenAI): method extract (line 151) | def extract(self, email_content: str, category: str) -> Dict[str, Opti... method _get_bug_extraction_prompt (line 185) | def _get_bug_extraction_prompt(self, email_content: str) -> str: method _get_billing_extraction_prompt (line 199) | def _get_billing_extraction_prompt(self, email_content: str) -> str: method _get_feature_extraction_prompt (line 213) | def _get_feature_extraction_prompt(self, email_content: str) -> str: class ConfigurableSupportTriageAgent (line 229) | class ConfigurableSupportTriageAgent: method __init__ (line 232) | def __init__( method set_extractor (line 276) | def set_extractor(self, extractor: BaseExtractor): method classify_email (line 305) | def classify_email(self, email_content: str) -> str: method extract_info (line 376) | def extract_info( method generate_response (line 430) | def generate_response(self, category: str, extracted_info: Dict[str, A... method export_traces_to_log (line 505) | def export_traces_to_log( method process_email (line 531) | def process_email( function default_workflow_client (line 616) | def default_workflow_client( function main (line 646) | def main(): FILE: src/ragas/__init__.py function __getattr__ (line 45) | def __getattr__(name): FILE: src/ragas/_analytics.py function do_not_track (line 46) | def do_not_track() -> bool: # pragma: no cover function _usage_event_debugging (line 53) | def _usage_event_debugging() -> bool: function silent (line 58) | def silent(func: t.Callable[P, T]) -> t.Callable[P, T]: # pragma: no cover function get_userid (line 81) | def get_userid() -> str: class BaseEvent (line 109) | class BaseEvent(BaseModel): class EvaluationEvent (line 115) | class EvaluationEvent(BaseEvent): class TestsetGenerationEvent (line 123) | class TestsetGenerationEvent(BaseEvent): class AnalyticsBatcher (line 132) | class AnalyticsBatcher: method __init__ (line 133) | def __init__(self, batch_size: int = 50, flush_interval: float = 120): method _flush_loop (line 155) | def _flush_loop(self) -> None: method add_evaluation (line 165) | def add_evaluation(self, evaluation_event: EvaluationEvent) -> None: method _join_evaluation_events (line 169) | def _join_evaluation_events( method flush (line 196) | def flush(self) -> None: method shutdown (line 215) | def shutdown(self) -> None: function track (line 223) | def track(event_properties: BaseEvent): class IsCompleteEvent (line 236) | class IsCompleteEvent(BaseEvent): class LLMUsageEvent (line 240) | class LLMUsageEvent(BaseEvent): class EmbeddingUsageEvent (line 249) | class EmbeddingUsageEvent(BaseEvent): class PromptUsageEvent (line 258) | class PromptUsageEvent(BaseEvent): function track_was_completed (line 268) | def track_was_completed( FILE: src/ragas/async_utils.py function is_event_loop_running (line 10) | def is_event_loop_running() -> bool: function apply_nest_asyncio (line 22) | def apply_nest_asyncio() -> bool: function as_completed (line 58) | def as_completed( function process_futures (line 99) | async def process_futures( function run (line 122) | def run( function run_async_tasks (line 159) | def run_async_tasks( FILE: src/ragas/backends/base.py class BaseBackend (line 9) | class BaseBackend(ABC): method load_dataset (line 47) | def load_dataset(self, name: str) -> t.List[t.Dict[str, t.Any]]: method load_experiment (line 67) | def load_experiment(self, name: str) -> t.List[t.Dict[str, t.Any]]: method save_dataset (line 86) | def save_dataset( method save_experiment (line 108) | def save_experiment( method list_datasets (line 128) | def list_datasets(self) -> t.List[str]: method list_experiments (line 142) | def list_experiments(self) -> t.List[str]: FILE: src/ragas/backends/gdrive_backend.py function build (line 29) | def build(*args, **kwargs): class GDriveBackend (line 38) | class GDriveBackend(BaseBackend): method __init__ (line 76) | def __init__( method _setup_auth (line 112) | def _setup_auth(self): method _ensure_folder_structure (line 155) | def _ensure_folder_structure(self): method _get_or_create_folder (line 179) | def _get_or_create_folder(self, folder_name: str, parent_id: str) -> str: method _get_folder_id_for_type (line 200) | def _get_folder_id_for_type(self, data_type: str) -> str: method _get_or_create_spreadsheet (line 211) | def _get_or_create_spreadsheet(self, name: str, data_type: str) -> str: method _spreadsheet_exists (line 237) | def _spreadsheet_exists(self, name: str, data_type: str) -> bool: method _load_data_from_spreadsheet (line 246) | def _load_data_from_spreadsheet( method _save_data_to_spreadsheet (line 314) | def _save_data_to_spreadsheet( method _list_data_names (line 377) | def _list_data_names(self, data_type: str) -> t.List[str]: method load_dataset (line 398) | def load_dataset(self, name: str) -> t.List[t.Dict[str, t.Any]]: method load_experiment (line 402) | def load_experiment(self, name: str) -> t.List[t.Dict[str, t.Any]]: method save_dataset (line 406) | def save_dataset( method save_experiment (line 415) | def save_experiment( method list_datasets (line 424) | def list_datasets(self) -> t.List[str]: method list_experiments (line 428) | def list_experiments(self) -> t.List[str]: method __repr__ (line 432) | def __repr__(self) -> str: FILE: src/ragas/backends/inmemory.py class InMemoryBackend (line 11) | class InMemoryBackend(BaseBackend): method __init__ (line 33) | def __init__(self): method load_dataset (line 38) | def load_dataset(self, name: str) -> t.List[t.Dict[str, t.Any]]: method load_experiment (line 56) | def load_experiment(self, name: str) -> t.List[t.Dict[str, t.Any]]: method save_dataset (line 74) | def save_dataset( method save_experiment (line 95) | def save_experiment( method list_datasets (line 116) | def list_datasets(self) -> t.List[str]: method list_experiments (line 124) | def list_experiments(self) -> t.List[str]: FILE: src/ragas/backends/local_csv.py class LocalCSVBackend (line 12) | class LocalCSVBackend(BaseBackend): method __init__ (line 42) | def __init__( method _get_data_dir (line 48) | def _get_data_dir(self, data_type: str) -> Path: method _get_file_path (line 52) | def _get_file_path(self, data_type: str, name: str) -> Path: method _load (line 56) | def _load(self, data_type: str, name: str) -> t.List[t.Dict[str, t.Any]]: method _save (line 69) | def _save( method _list (line 96) | def _list(self, data_type: str) -> t.List[str]: method load_dataset (line 108) | def load_dataset(self, name: str) -> t.List[t.Dict[str, t.Any]]: method load_experiment (line 112) | def load_experiment(self, name: str) -> t.List[t.Dict[str, t.Any]]: method save_dataset (line 116) | def save_dataset( method save_experiment (line 125) | def save_experiment( method list_datasets (line 134) | def list_datasets(self) -> t.List[str]: method list_experiments (line 138) | def list_experiments(self) -> t.List[str]: method __repr__ (line 142) | def __repr__(self) -> str: FILE: src/ragas/backends/local_jsonl.py class LocalJSONLBackend (line 13) | class LocalJSONLBackend(BaseBackend): method __init__ (line 47) | def __init__( method _get_data_dir (line 53) | def _get_data_dir(self, data_type: str) -> Path: method _get_file_path (line 57) | def _get_file_path(self, data_type: str, name: str) -> Path: method _serialize_datetime (line 61) | def _serialize_datetime(self, obj: t.Any) -> t.Any: method _deserialize_datetime (line 74) | def _deserialize_datetime(self, obj: t.Any) -> t.Any: method _load (line 96) | def _load(self, data_type: str, name: str) -> t.List[t.Dict[str, t.Any]]: method _save (line 125) | def _save( method _list (line 156) | def _list(self, data_type: str) -> t.List[str]: method load_dataset (line 168) | def load_dataset(self, name: str) -> t.List[t.Dict[str, t.Any]]: method load_experiment (line 172) | def load_experiment(self, name: str) -> t.List[t.Dict[str, t.Any]]: method save_dataset (line 176) | def save_dataset( method save_experiment (line 185) | def save_experiment( method list_datasets (line 194) | def list_datasets(self) -> t.List[str]: method list_experiments (line 198) | def list_experiments(self) -> t.List[str]: method __repr__ (line 202) | def __repr__(self) -> str: FILE: src/ragas/backends/registry.py class BackendRegistry (line 12) | class BackendRegistry: method __new__ (line 20) | def __new__(cls): method _resolve_name (line 26) | def _resolve_name(self, name: str) -> str: method _get_available_names (line 30) | def _get_available_names(self) -> t.List[str]: method _get_aliases_for (line 36) | def _get_aliases_for(self, primary_name: str) -> t.List[str]: method _validate_name (line 42) | def _validate_name(self, name: str) -> None: method _validate_backend_class (line 47) | def _validate_backend_class(self, backend_class: t.Type[BaseBackend]) ... method register_aliases (line 54) | def register_aliases( method list_all_names (line 84) | def list_all_names(self) -> t.Dict[str, t.List[str]]: method discover_backends (line 97) | def discover_backends(self) -> t.Dict[str, t.Type[BaseBackend]]: method _discover_backends (line 112) | def _discover_backends(self) -> None: method get_backend_info (line 138) | def get_backend_info(self, name: str) -> t.Dict[str, t.Any]: method list_backend_info (line 159) | def list_backend_info(self) -> t.List[t.Dict[str, t.Any]]: method clear (line 170) | def clear(self) -> None: method create_backend (line 176) | def create_backend(self, backend_type: str, **kwargs) -> BaseBackend: method __getitem__ (line 189) | def __getitem__(self, name: str) -> t.Type[BaseBackend]: method __setitem__ (line 202) | def __setitem__(self, name: str, backend_class: t.Type[BaseBackend]) -... method __delitem__ (line 210) | def __delitem__(self, name: str) -> None: method __contains__ (line 230) | def __contains__(self, name: str) -> bool: method __iter__ (line 236) | def __iter__(self) -> t.Iterator[str]: method __len__ (line 242) | def __len__(self) -> int: method keys (line 248) | def keys(self) -> t.KeysView[str]: method values (line 254) | def values(self) -> t.ValuesView[t.Type[BaseBackend]]: method items (line 260) | def items(self) -> t.ItemsView[str, t.Type[BaseBackend]]: method __repr__ (line 266) | def __repr__(self) -> str: function get_registry (line 277) | def get_registry() -> BackendRegistry: function register_backend (line 282) | def register_backend( function print_available_backends (line 299) | def print_available_backends() -> None: FILE: src/ragas/backends/utils.py class MemorableNames (line 8) | class MemorableNames: method __init__ (line 11) | def __init__(self): method generate_name (line 189) | def generate_name(self): method generate_unique_name (line 195) | def generate_unique_name(self): method generate_unique_names (line 213) | def generate_unique_names(self, count): FILE: src/ragas/cache.py class CacheInterface (line 16) | class CacheInterface(ABC): method get (line 24) | def get(self, key: str) -> Any: method set (line 36) | def set(self, key: str, value) -> None: method has_key (line 46) | def has_key(self, key: str) -> bool: method __get_pydantic_core_schema__ (line 58) | def __get_pydantic_core_schema__( class DiskCacheBackend (line 70) | class DiskCacheBackend(CacheInterface): method __init__ (line 80) | def __init__(self, cache_dir: str = ".cache"): method get (line 90) | def get(self, key: str) -> Any: method set (line 101) | def set(self, key: str, value) -> None: method has_key (line 110) | def has_key(self, key: str) -> bool: method __del__ (line 121) | def __del__(self): method __repr__ (line 126) | def __repr__(self): function _make_hashable (line 135) | def _make_hashable(o): function _make_pydantic_picklable (line 151) | def _make_pydantic_picklable(obj: Any) -> Any: function _generate_cache_key (line 184) | def _generate_cache_key(func, args, kwargs): function cacher (line 198) | def cacher(cache_backend: Optional[CacheInterface] = None): FILE: src/ragas/callbacks.py function new_group (line 19) | def new_group( class ChainType (line 52) | class ChainType(Enum): class ChainRun (line 59) | class ChainRun(BaseModel): class ChainRunEncoder (line 69) | class ChainRunEncoder(json.JSONEncoder): method default (line 70) | def default(self, o): class RagasTracer (line 81) | class RagasTracer(BaseCallbackHandler): method on_chain_start (line 84) | def on_chain_start( method on_chain_end (line 107) | def on_chain_end( method to_jsons (line 116) | def to_jsons(self) -> str: class MetricTrace (line 124) | class MetricTrace(dict): method __repr__ (line 127) | def __repr__(self): method __str__ (line 130) | def __str__(self): function parse_run_traces (line 134) | def parse_run_traces( FILE: src/ragas/cli.py function main (line 28) | def main(): function success (line 34) | def success(text: str) -> None: function error (line 39) | def error(text: str) -> None: function info (line 44) | def info(text: str) -> None: function warning (line 49) | def warning(text: str) -> None: function create_numerical_metrics_table (line 54) | def create_numerical_metrics_table( function create_categorical_metrics_table (line 101) | def create_categorical_metrics_table( function extract_metrics_from_experiment (line 163) | def extract_metrics_from_experiment(experiment, metric_fields: list) -> ... function calculate_aggregated_metrics (line 173) | def calculate_aggregated_metrics(metrics_data: Dict[str, list]) -> Dict[... function separate_metrics_by_type (line 191) | def separate_metrics_by_type( function display_metrics_tables (line 224) | def display_metrics_tables( function load_eval_module (line 241) | def load_eval_module(eval_path: str) -> Any: function run_experiments (line 264) | async def run_experiments( function evals (line 371) | def evals( function quickstart (line 461) | def quickstart( function hello_world (line 900) | def hello_world( FILE: src/ragas/config.py class DemonstrationConfig (line 15) | class DemonstrationConfig(BaseModel): method validate_embedding (line 23) | def validate_embedding(cls, v): class InstructionConfig (line 29) | class InstructionConfig(BaseModel): FILE: src/ragas/cost.py class TokenUsage (line 15) | class TokenUsage(BaseModel): method __add__ (line 20) | def __add__(self, y: "TokenUsage") -> "TokenUsage": method cost (line 30) | def cost( method __eq__ (line 43) | def __eq__(self, other: object) -> bool: method is_same_model (line 52) | def is_same_model(self, other: "TokenUsage") -> bool: function get_token_usage_for_openai (line 61) | def get_token_usage_for_openai( function get_token_usage_for_anthropic (line 78) | def get_token_usage_for_anthropic( function get_token_usage_for_bedrock (line 112) | def get_token_usage_for_bedrock( function get_token_usage_for_azure_ai (line 144) | def get_token_usage_for_azure_ai( class CostCallbackHandler (line 161) | class CostCallbackHandler(BaseCallbackHandler): method __init__ (line 162) | def __init__(self, token_usage_parser: TokenUsageParser): method on_llm_end (line 166) | def on_llm_end(self, response: LLMResult, **kwargs: t.Any): method total_cost (line 169) | def total_cost( method total_tokens (line 219) | def total_tokens(self) -> t.Union[TokenUsage, t.List[TokenUsage]]: FILE: src/ragas/dataset.py class DataTable (line 31) | class DataTable(t.Generic[T]): method __init__ (line 41) | def __init__( method __init__ (line 50) | def __init__( method __init__ (line 59) | def __init__( method __init__ (line 69) | def __init__( method __init__ (line 77) | def __init__( method _resolve_backend (line 110) | def _resolve_backend(backend: t.Union[BaseBackend, str], **kwargs) -> ... method load (line 156) | def load( method from_pandas (line 202) | def from_pandas( method save (line 254) | def save(self) -> None: method reload (line 275) | def reload(self) -> None: method validate_with (line 290) | def validate_with(self, data_model: t.Type[T]) -> Self: method to_pandas (line 316) | def to_pandas(self) -> "PandasDataFrame": method append (line 337) | def append(self, item: t.Union[t.Dict, BaseModel]) -> None: method __len__ (line 359) | def __len__(self) -> int: method __getitem__ (line 362) | def __getitem__(self, index): method __iter__ (line 365) | def __iter__(self): method __str__ (line 368) | def __str__(self): method get_row_value (line 375) | def get_row_value(self, row, key: str): method train_test_split (line 383) | def train_test_split( class Dataset (line 458) | class Dataset(DataTable[T]): FILE: src/ragas/dataset_schema.py class BaseSample (line 29) | class BaseSample(BaseModel): method to_dict (line 34) | def to_dict(self) -> t.Dict: method get_features (line 40) | def get_features(self) -> t.List[str]: method to_string (line 46) | def to_string(self) -> str: class SingleTurnSample (line 54) | class SingleTurnSample(BaseSample): class MultiTurnSample (line 100) | class MultiTurnSample(BaseSample): method validate_user_input (line 126) | def validate_user_input( method to_messages (line 169) | def to_messages(self): method pretty_repr (line 173) | def pretty_repr(self): class RagasDataset (line 187) | class RagasDataset(ABC, t.Generic[Sample]): method __post_init__ (line 190) | def __post_init__(self): method to_list (line 194) | def to_list(self) -> t.List[t.Dict]: method from_list (line 200) | def from_list(cls: t.Type[T], data: t.List[t.Dict]) -> T: method validate_samples (line 204) | def validate_samples(self, samples: t.List[Sample]) -> t.List[Sample]: method get_sample_type (line 218) | def get_sample_type(self) -> t.Type[Sample]: method to_hf_dataset (line 222) | def to_hf_dataset(self) -> HFDataset: method from_hf_dataset (line 234) | def from_hf_dataset(cls: t.Type[T], dataset: HFDataset) -> T: method to_pandas (line 238) | def to_pandas(self) -> PandasDataframe: method from_pandas (line 251) | def from_pandas(cls, dataframe: PandasDataframe): method features (line 255) | def features(self): method from_dict (line 260) | def from_dict(cls: t.Type[T], mapping: t.Dict) -> T: method to_csv (line 272) | def to_csv(self, path: t.Union[str, Path]): method to_jsonl (line 288) | def to_jsonl(self, path: t.Union[str, Path]): method from_jsonl (line 295) | def from_jsonl(cls: t.Type[T], path: t.Union[str, Path]) -> T: method __iter__ (line 301) | def __iter__(self) -> t.Iterator[Sample]: # type: ignore method __len__ (line 304) | def __len__(self) -> int: method __str__ (line 307) | def __str__(self) -> str: method __repr__ (line 310) | def __repr__(self) -> str: class EvaluationDataset (line 318) | class EvaluationDataset(RagasDataset[SingleTurnSampleOrMultiTurnSample]): method __getitem__ (line 359) | def __getitem__(self, idx: int) -> SingleTurnSampleOrMultiTurnSample: ... method __getitem__ (line 362) | def __getitem__(self, idx: slice) -> "EvaluationDataset": ... method __getitem__ (line 364) | def __getitem__( method is_multi_turn (line 374) | def is_multi_turn(self) -> bool: method to_list (line 377) | def to_list(self) -> t.List[t.Dict]: method from_list (line 391) | def from_list( method __repr__ (line 407) | def __repr__(self) -> str: class EvaluationResult (line 412) | class EvaluationResult: method __post_init__ (line 436) | def __post_init__(self): method __repr__ (line 455) | def __repr__(self) -> str: method __getitem__ (line 459) | def __getitem__(self, key: str) -> t.List[float]: method to_pandas (line 462) | def to_pandas(self, batch_size: int | None = None, batched: bool = Fal... method total_tokens (line 498) | def total_tokens(self) -> t.Union[t.List[TokenUsage], TokenUsage]: method total_cost (line 518) | def total_cost( class PromptAnnotation (line 555) | class PromptAnnotation(BaseModel): method __getitem__ (line 560) | def __getitem__(self, key): class SampleAnnotation (line 564) | class SampleAnnotation(BaseModel): method __getitem__ (line 571) | def __getitem__(self, key): class MetricAnnotation (line 575) | class MetricAnnotation(BaseModel): method __getitem__ (line 578) | def __getitem__(self, key): method _process_dataset (line 582) | def _process_dataset( method from_json (line 612) | def from_json(cls, path: str, metric_name: t.Optional[str]) -> "Metric... method __len__ (line 617) | def __len__(self): class SingleMetricAnnotation (line 621) | class SingleMetricAnnotation(BaseModel): method to_evaluation_dataset (line 625) | def to_evaluation_dataset(self) -> EvaluationDataset: method __getitem__ (line 629) | def __getitem__(self, idx): method __repr__ (line 632) | def __repr__(self): method __iter__ (line 635) | def __iter__(self) -> t.Iterator[SampleAnnotation]: # type: ignore method select (line 638) | def select(self, indices: t.List[int]) -> "SingleMetricAnnotation": method from_json (line 645) | def from_json(cls, path) -> "SingleMetricAnnotation": method filter (line 653) | def filter(self, function: t.Optional[t.Callable] = None): method __len__ (line 662) | def __len__(self): method train_test_split (line 665) | def train_test_split( method sample (line 681) | def sample( method batch (line 736) | def batch( method stratified_batches (line 761) | def stratified_batches( method get_prompt_annotations (line 828) | def get_prompt_annotations(self) -> t.Dict[str, t.List[PromptAnnotatio... FILE: src/ragas/embeddings/__init__.py function embedding_factory (line 39) | def embedding_factory(*args, **kwargs): FILE: src/ragas/embeddings/base.py class BaseRagasEmbedding (line 29) | class BaseRagasEmbedding(ABC): method __init__ (line 37) | def __init__(self, cache: t.Optional[CacheInterface] = None): method embed_text (line 51) | def embed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method aembed_text (line 64) | async def aembed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method embed_texts (line 76) | def embed_texts(self, texts: t.List[str], **kwargs: t.Any) -> t.List[t... method aembed_texts (line 92) | async def aembed_texts( method _check_client_async (line 111) | def _check_client_async( method _run_async_in_current_loop (line 131) | def _run_async_in_current_loop(self, coro): method _from_factory (line 146) | def _from_factory( class BaseRagasEmbeddings (line 182) | class BaseRagasEmbeddings(Embeddings, ABC): method __init__ (line 197) | def __init__(self, cache: t.Optional[CacheInterface] = None): method embed_text (line 210) | async def embed_text(self, text: str, is_async=True) -> t.List[float]: method embed_texts (line 217) | async def embed_texts( method aembed_query (line 236) | async def aembed_query(self, text: str) -> t.List[float]: ... method aembed_documents (line 239) | async def aembed_documents(self, texts: t.List[str]) -> t.List[t.List[... method set_run_config (line 241) | def set_run_config(self, run_config: RunConfig): method __get_pydantic_core_schema__ (line 248) | def __get_pydantic_core_schema__( class LangchainEmbeddingsWrapper (line 260) | class LangchainEmbeddingsWrapper(BaseRagasEmbeddings): method __init__ (line 278) | def __init__( method embed_query (line 298) | def embed_query(self, text: str) -> t.List[float]: method embed_documents (line 316) | def embed_documents(self, texts: t.List[str]) -> t.List[t.List[float]]: method aembed_query (line 334) | async def aembed_query(self, text: str) -> t.List[float]: method aembed_documents (line 352) | async def aembed_documents(self, texts: t.List[str]) -> t.List[t.List[... method set_run_config (line 370) | def set_run_config(self, run_config: RunConfig): method __repr__ (line 387) | def __repr__(self) -> str: class HuggingfaceEmbeddings (line 392) | class HuggingfaceEmbeddings(BaseRagasEmbeddings): method __post_init__ (line 445) | def __post_init__(self): method embed_query (line 485) | def embed_query(self, text: str) -> t.List[float]: method embed_documents (line 491) | def embed_documents(self, texts: t.List[str]) -> t.List[t.List[float]]: method predict (line 508) | def predict(self, texts: t.List[t.List[str]]) -> t.List[t.List[float]]: class LlamaIndexEmbeddingsWrapper (line 525) | class LlamaIndexEmbeddingsWrapper(BaseRagasEmbeddings): method __init__ (line 568) | def __init__( method embed_query (line 588) | def embed_query(self, text: str) -> t.List[float]: method embed_documents (line 591) | def embed_documents(self, texts: t.List[str]) -> t.List[t.List[float]]: method aembed_query (line 594) | async def aembed_query(self, text: str) -> t.List[float]: method aembed_documents (line 597) | async def aembed_documents(self, texts: t.List[str]) -> t.List[t.List[... method __repr__ (line 600) | def __repr__(self) -> str: function _infer_embedding_provider_from_llm (line 604) | def _infer_embedding_provider_from_llm(llm: t.Any) -> str: function embedding_factory (line 655) | def embedding_factory( function _is_legacy_embedding_call (line 776) | def _is_legacy_embedding_call( function _looks_like_model_name (line 792) | def _looks_like_model_name(name: str) -> bool: function _get_provider_registry (line 797) | def _get_provider_registry() -> t.Dict[str, t.Type[BaseRagasEmbedding]]: function _create_modern_embedding (line 820) | def _create_modern_embedding( function modern_embedding_factory (line 846) | def modern_embedding_factory( FILE: src/ragas/embeddings/google_provider.py class GoogleEmbeddings (line 12) | class GoogleEmbeddings(BaseRagasEmbedding): method __init__ (line 49) | def __init__( method _resolve_client (line 73) | def _resolve_client(self, client: t.Optional[t.Any], use_vertex: bool)... method _is_new_genai_client (line 146) | def _is_new_genai_client(self, client: t.Any) -> bool: method _import_genai_module (line 166) | def _import_genai_module(self) -> t.Any: method embed_text (line 206) | def embed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method _embed_text_vertex (line 213) | def _embed_text_vertex(self, text: str, **kwargs: t.Any) -> t.List[flo... method _embed_text_genai (line 228) | def _embed_text_genai(self, text: str, **kwargs: t.Any) -> t.List[float]: method aembed_text (line 249) | async def aembed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method embed_texts (line 256) | def embed_texts(self, texts: t.List[str], **kwargs: t.Any) -> t.List[t... method _embed_texts_vertex (line 267) | def _embed_texts_vertex( method _embed_texts_genai (line 284) | def _embed_texts_genai( method aembed_texts (line 303) | async def aembed_texts( method _get_client_info (line 313) | def _get_client_info(self) -> str: method _get_key_config (line 321) | def _get_key_config(self) -> str: method __repr__ (line 336) | def __repr__(self) -> str: FILE: src/ragas/embeddings/haystack_wrapper.py class HaystackEmbeddingsWrapper (line 25) | class HaystackEmbeddingsWrapper(BaseRagasEmbeddings): method __init__ (line 43) | def __init__( method embed_query (line 103) | def embed_query(self, text: str) -> t.List[float]: method embed_documents (line 109) | def embed_documents(self, texts: t.List[str]) -> t.List[t.List[float]]: method aembed_query (line 112) | async def aembed_query(self, text: str) -> t.List[float]: method aembed_documents (line 117) | async def aembed_documents(self, texts: t.List[str]) -> t.List[t.List[... method __repr__ (line 122) | def __repr__(self) -> str: FILE: src/ragas/embeddings/huggingface_provider.py class HuggingFaceEmbeddings (line 11) | class HuggingFaceEmbeddings(BaseRagasEmbedding): method __init__ (line 21) | def __init__( method _setup_api_client (line 46) | def _setup_api_client(self): method _setup_local_model (line 61) | def _setup_local_model(self): method embed_text (line 75) | def embed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method _embed_text_api (line 82) | def _embed_text_api(self, text: str, **kwargs: t.Any) -> t.List[float]: method _embed_text_local (line 90) | def _embed_text_local(self, text: str, **kwargs: t.Any) -> t.List[float]: method aembed_text (line 97) | async def aembed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method _aembed_text_api (line 104) | async def _aembed_text_api(self, text: str, **kwargs: t.Any) -> t.List... method embed_texts (line 109) | def embed_texts(self, texts: t.List[str], **kwargs: t.Any) -> t.List[t... method _embed_texts_api (line 120) | def _embed_texts_api( method _embed_texts_local (line 140) | def _embed_texts_local( method aembed_texts (line 152) | async def aembed_texts( method _get_client_info (line 165) | def _get_client_info(self) -> str: method _get_key_config (line 172) | def _get_key_config(self) -> str: method __repr__ (line 193) | def __repr__(self) -> str: FILE: src/ragas/embeddings/litellm_provider.py class LiteLLMEmbeddings (line 11) | class LiteLLMEmbeddings(BaseRagasEmbedding): method __init__ (line 21) | def __init__( method _prepare_kwargs (line 44) | def _prepare_kwargs(self, **kwargs: t.Any) -> t.Dict[str, t.Any]: method embed_text (line 63) | def embed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method aembed_text (line 69) | async def aembed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method embed_texts (line 75) | def embed_texts(self, texts: t.List[str], **kwargs: t.Any) -> t.List[t... method aembed_texts (line 91) | async def aembed_texts( method _get_key_config (line 109) | def _get_key_config(self) -> str: method __repr__ (line 131) | def __repr__(self) -> str: FILE: src/ragas/embeddings/openai_provider.py class OpenAIEmbeddings (line 10) | class OpenAIEmbeddings(BaseRagasEmbedding): method __init__ (line 21) | def __init__( method embed_text (line 32) | def embed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method aembed_text (line 57) | async def aembed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method embed_texts (line 81) | def embed_texts(self, texts: t.List[str], **kwargs: t.Any) -> t.List[t... method aembed_texts (line 108) | async def aembed_texts( method _get_client_info (line 138) | def _get_client_info(self) -> str: method __repr__ (line 144) | def __repr__(self) -> str: FILE: src/ragas/embeddings/utils.py function run_async_in_current_loop (line 9) | def run_async_in_current_loop(coro: t.Awaitable[t.Any]) -> t.Any: function run_sync_in_async (line 73) | async def run_sync_in_async(func: t.Callable, *args, **kwargs) -> t.Any: function batch_texts (line 89) | def batch_texts(texts: t.List[str], batch_size: int) -> t.List[t.List[st... function get_optimal_batch_size (line 108) | def get_optimal_batch_size(provider: str, model: str) -> int: function validate_texts (line 133) | def validate_texts(texts: t.Union[str, t.List[str]]) -> t.List[str]: function safe_import (line 163) | def safe_import(module_name: str, package_name: t.Optional[str] = None) ... FILE: src/ragas/evaluation.py function aevaluate (line 59) | async def aevaluate( function evaluate (line 349) | def evaluate( FILE: src/ragas/exceptions.py class RagasException (line 4) | class RagasException(Exception): method __init__ (line 9) | def __init__(self, message: str): class ExceptionInRunner (line 14) | class ExceptionInRunner(RagasException): method __init__ (line 19) | def __init__(self): class RagasOutputParserException (line 24) | class RagasOutputParserException(RagasException): method __init__ (line 29) | def __init__(self): class LLMDidNotFinishException (line 34) | class LLMDidNotFinishException(RagasException): method __init__ (line 39) | def __init__(self): class RagasError (line 45) | class RagasError(Exception): class ValidationError (line 51) | class ValidationError(RagasError): class DuplicateError (line 57) | class DuplicateError(RagasError): class NotFoundError (line 63) | class NotFoundError(RagasError): class ResourceNotFoundError (line 69) | class ResourceNotFoundError(NotFoundError): class ProjectNotFoundError (line 75) | class ProjectNotFoundError(ResourceNotFoundError): class DatasetNotFoundError (line 81) | class DatasetNotFoundError(ResourceNotFoundError): class ExperimentNotFoundError (line 87) | class ExperimentNotFoundError(ResourceNotFoundError): class DuplicateResourceError (line 93) | class DuplicateResourceError(RagasError): class DuplicateProjectError (line 99) | class DuplicateProjectError(DuplicateResourceError): class DuplicateDatasetError (line 105) | class DuplicateDatasetError(DuplicateResourceError): class DuplicateExperimentError (line 111) | class DuplicateExperimentError(DuplicateResourceError): FILE: src/ragas/executor.py class Executor (line 19) | class Executor: method cancel (line 56) | def cancel(self) -> None: method is_cancelled (line 60) | def is_cancelled(self) -> bool: method wrap_callable_with_index (line 64) | def wrap_callable_with_index( method submit (line 88) | def submit( method clear_jobs (line 105) | def clear_jobs(self) -> None: method _process_jobs (line 110) | async def _process_jobs(self) -> t.List[t.Any]: method _process_batched_jobs (line 144) | async def _process_batched_jobs( method _process_coroutines (line 180) | async def _process_coroutines(self, jobs, pbar, results, max_workers): method aresults (line 193) | async def aresults(self) -> t.List[t.Any]: method results (line 204) | def results(self) -> t.List[t.Any]: function run_async_batch (line 218) | def run_async_batch( FILE: src/ragas/experiment.py class Experiment (line 17) | class Experiment(DataTable): function version_experiment (line 21) | def version_experiment( class ExperimentProtocol (line 104) | class ExperimentProtocol(t.Protocol): method __call__ (line 105) | async def __call__(self, *args, **kwargs) -> t.Any: ... method arun (line 106) | async def arun( class ExperimentWrapper (line 116) | class ExperimentWrapper: method __init__ (line 119) | def __init__( method __call__ (line 134) | async def __call__(self, *args, **kwargs) -> t.Any: method arun (line 141) | async def arun( function experiment (line 201) | def experiment( FILE: src/ragas/integrations/ag_ui.py function _import_ag_ui_core (line 131) | def _import_ag_ui_core(): class AGUIEventCollector (line 172) | class AGUIEventCollector: method __init__ (line 197) | def __init__(self, metadata: bool = False): method _get_pending_tool_calls (line 236) | def _get_pending_tool_calls(self) -> Optional[List[ToolCall]]: method process_event (line 251) | def process_event(self, event: Any) -> None: method _handle_text_message_start (line 313) | def _handle_text_message_start(self, event: Any) -> None: method _handle_text_message_content (line 322) | def _handle_text_message_content(self, event: Any) -> None: method _handle_text_message_end (line 333) | def _handle_text_message_end(self, event: Any) -> None: method _handle_tool_call_start (line 373) | def _handle_tool_call_start(self, event: Any) -> None: method _handle_tool_call_args (line 383) | def _handle_tool_call_args(self, event: Any) -> None: method _handle_tool_call_end (line 394) | def _handle_tool_call_end(self, event: Any) -> None: method _handle_tool_call_result (line 419) | def _handle_tool_call_result(self, event: Any) -> None: method _handle_text_message_chunk (line 515) | def _handle_text_message_chunk(self, event: Any) -> None: method _handle_tool_call_chunk (line 555) | def _handle_tool_call_chunk(self, event: Any) -> None: method _handle_messages_snapshot (line 599) | def _handle_messages_snapshot(self, event: Any) -> None: method get_messages (line 658) | def get_messages(self) -> List[Union[HumanMessage, AIMessage, ToolMess... method clear (line 675) | def clear(self) -> None: function convert_to_ragas_messages (line 691) | def convert_to_ragas_messages( function convert_messages_snapshot (line 788) | def convert_messages_snapshot( function convert_messages_to_ag_ui (line 850) | def convert_messages_to_ag_ui( function call_ag_ui_endpoint (line 940) | async def call_ag_ui_endpoint( function extract_response (line 1080) | def extract_response( function extract_tool_calls (line 1107) | def extract_tool_calls( function extract_contexts (line 1135) | def extract_contexts( function build_sample (line 1164) | def build_sample( function run_ag_ui_row (line 1266) | async def run_ag_ui_row( FILE: src/ragas/integrations/amazon_bedrock.py function get_last_orchestration_value (line 7) | def get_last_orchestration_value(traces: t.List[t.Dict[str, t.Any]], key... function extract_messages_from_model_invocation (line 25) | def extract_messages_from_model_invocation(model_inv): function convert_to_ragas_messages (line 45) | def convert_to_ragas_messages(traces: t.List): function extract_kb_trace (line 74) | def extract_kb_trace(traces): FILE: src/ragas/integrations/griptape.py function transform_to_ragas_dataset (line 13) | def transform_to_ragas_dataset( FILE: src/ragas/integrations/helicone.py class CacheConfig (line 6) | class CacheConfig: class HeliconeSingleton (line 12) | class HeliconeSingleton: method __new__ (line 41) | def __new__(cls): method default_headers (line 46) | def default_headers(self) -> Dict[str, Any]: method is_enabled (line 97) | def is_enabled(self): FILE: src/ragas/integrations/langchain.py class EvaluatorChain (line 32) | class EvaluatorChain(Chain, RunEvaluator): method __init__ (line 39) | def __init__(self, metric: Metric, **kwargs: t.Any): method input_keys (line 61) | def input_keys(self) -> list[str]: method output_keys (line 65) | def output_keys(self) -> list[str]: method _call (line 68) | def _call( method _acall (line 98) | async def _acall( method _validate (line 129) | def _validate(self, input: SingleTurnSample) -> None: method _keys_are_present (line 140) | def _keys_are_present(keys_to_check: list, dict_to_check: dict) -> lis... method _validate_langsmith_eval (line 143) | def _validate_langsmith_eval(self, run: Run, example: t.Optional[Examp... method evaluate_run (line 176) | def evaluate_run( FILE: src/ragas/integrations/langgraph.py function convert_to_ragas_messages (line 9) | def convert_to_ragas_messages( FILE: src/ragas/integrations/langsmith.py function upload_dataset (line 23) | def upload_dataset( function evaluate (line 82) | def evaluate( FILE: src/ragas/integrations/llama_index.py function evaluate (line 31) | def evaluate( function convert_to_ragas_messages (line 120) | def convert_to_ragas_messages(events: t.List[Event]) -> t.List[Message]: FILE: src/ragas/integrations/opik.py class OpikTracer (line 22) | class OpikTracer(LangchainOpikTracer): method _process_start_trace (line 36) | def _process_start_trace(self, run: "Run"): method _process_end_trace (line 46) | def _process_end_trace(self, run: "Run"): method _persist_run (line 64) | def _persist_run(self, run: "Run"): FILE: src/ragas/integrations/r2r.py function _process_search_results (line 16) | def _process_search_results(search_results: t.Dict[str, t.List]) -> t.Li... function transform_to_ragas_dataset (line 51) | def transform_to_ragas_dataset( FILE: src/ragas/integrations/swarm.py function convert_to_ragas_messages (line 7) | def convert_to_ragas_messages( FILE: src/ragas/integrations/tracing/__init__.py function __getattr__ (line 53) | def __getattr__(name: str): FILE: src/ragas/integrations/tracing/langfuse.py class Observation (line 24) | class Observation: # type: ignore class TraceWithFullDetails (line 27) | class TraceWithFullDetails: # type: ignore method __init__ (line 28) | def __init__( class Langfuse (line 52) | class Langfuse: # type: ignore method get_current_trace_id (line 53) | def get_current_trace_id(self) -> t.Optional[str]: # type: ignore method get_trace_url (line 56) | def get_trace_url(self) -> t.Optional[str]: # type: ignore method get_dataset (line 59) | def get_dataset(self, *args, **kwargs): # type: ignore function observe (line 62) | def observe(*args, **kwargs): # type: ignore function observe (line 73) | def observe(*args, **kwargs): # type: ignore class LangfuseTrace (line 83) | class LangfuseTrace: method __init__ (line 84) | def __init__(self, trace: "TraceWithFullDetails"): method get_url (line 88) | def get_url(self) -> t.Optional[str]: method filter (line 91) | def filter(self, span_name: str) -> t.List["Observation"]: function sync_trace (line 97) | async def sync_trace( function add_query_param (line 146) | def add_query_param(url: str, param_name: str, param_value: str) -> str: FILE: src/ragas/integrations/tracing/mlflow.py class Span (line 23) | class Span: # type: ignore class Trace (line 26) | class Trace: # type: ignore method __init__ (line 27) | def __init__(self): # type: ignore method search_spans (line 32) | def search_spans(self, name: str) -> t.List["Span"]: # type: ignore function get_last_active_trace_id (line 35) | def get_last_active_trace_id() -> t.Optional[str]: # type: ignore function get_trace (line 38) | def get_trace(trace_id: str) -> t.Optional["Trace"]: # type: ignore class MLflowTrace (line 42) | class MLflowTrace: method __init__ (line 43) | def __init__(self, trace: "Trace"): method get_url (line 46) | def get_url(self) -> str: method get_filter (line 64) | def get_filter(self, span_name: str) -> t.List["Span"]: function sync_trace (line 68) | async def sync_trace() -> MLflowTrace: FILE: src/ragas/llms/adapters/__init__.py function get_adapter (line 12) | def get_adapter(name: str) -> t.Any: function _is_new_google_genai_client (line 30) | def _is_new_google_genai_client(client: t.Any) -> bool: function auto_detect_adapter (line 54) | def auto_detect_adapter(client: t.Any, provider: str) -> str: FILE: src/ragas/llms/adapters/base.py class StructuredOutputAdapter (line 5) | class StructuredOutputAdapter(ABC): method create_llm (line 14) | def create_llm( FILE: src/ragas/llms/adapters/instructor.py class InstructorAdapter (line 7) | class InstructorAdapter(StructuredOutputAdapter): method create_llm (line 14) | def create_llm( FILE: src/ragas/llms/adapters/litellm.py class LiteLLMAdapter (line 9) | class LiteLLMAdapter(StructuredOutputAdapter): method create_llm (line 16) | def create_llm( FILE: src/ragas/llms/base.py function is_multiple_completion_supported (line 48) | def is_multiple_completion_supported(llm: BaseLanguageModel) -> bool: class BaseRagasLLM (line 57) | class BaseRagasLLM(ABC): method __post_init__ (line 62) | def __post_init__(self): method set_run_config (line 68) | def set_run_config(self, run_config: RunConfig): method get_temperature (line 71) | def get_temperature(self, n: int) -> float: method generate_text (line 76) | def generate_text( method agenerate_text (line 86) | async def agenerate_text( method is_finished (line 96) | def is_finished(self, response: LLMResult) -> bool: method generate (line 100) | async def generate( class LangchainLLMWrapper (line 130) | class LangchainLLMWrapper(BaseRagasLLM): method __init__ (line 147) | def __init__( method is_finished (line 177) | def is_finished(self, response: LLMResult) -> bool: method generate_text (line 227) | def generate_text( method agenerate_text (line 279) | async def agenerate_text( method set_run_config (line 332) | def set_run_config(self, run_config: RunConfig): method __repr__ (line 348) | def __repr__(self) -> str: class LlamaIndexLLMWrapper (line 352) | class LlamaIndexLLMWrapper(BaseRagasLLM): method __init__ (line 366) | def __init__( method check_args (line 397) | def check_args( method is_finished (line 423) | def is_finished(self, response: LLMResult) -> bool: method generate_text (line 426) | def generate_text( method agenerate_text (line 439) | async def agenerate_text( method __repr__ (line 459) | def __repr__(self) -> str: function _patch_client_for_provider (line 463) | def _patch_client_for_provider( function _is_new_google_genai_client (line 534) | def _is_new_google_genai_client(client: t.Any) -> bool: function _get_instructor_client (line 566) | def _get_instructor_client( function llm_factory (line 606) | def llm_factory( class InstructorModelArgs (line 754) | class InstructorModelArgs(BaseModel): class InstructorBaseRagasLLM (line 767) | class InstructorBaseRagasLLM(ABC): method generate (line 771) | def generate( method agenerate (line 780) | async def agenerate( class InstructorLLM (line 788) | class InstructorLLM(InstructorBaseRagasLLM): method __init__ (line 791) | def __init__( method _map_provider_params (line 823) | def _map_provider_params(self) -> t.Dict[str, t.Any]: method _map_openai_params (line 842) | def _map_openai_params(self) -> t.Dict[str, t.Any]: method _map_google_params (line 922) | def _map_google_params(self) -> t.Dict[str, t.Any]: method _check_client_async (line 946) | def _check_client_async(self) -> bool: method _run_async_in_current_loop (line 1011) | def _run_async_in_current_loop(self, coro: t.Awaitable[t.Any]) -> t.Any: method generate (line 1068) | def generate( method agenerate (line 1117) | async def agenerate( method _get_client_info (line 1165) | def _get_client_info(self) -> str: method _get_key_config (line 1171) | def _get_key_config(self) -> str: method __repr__ (line 1194) | def __repr__(self) -> str: FILE: src/ragas/llms/haystack_wrapper.py class HaystackLLMWrapper (line 22) | class HaystackLLMWrapper(BaseRagasLLM): method __init__ (line 40) | def __init__( method is_finished (line 95) | def is_finished(self, response: LLMResult) -> bool: method generate_text (line 98) | def generate_text( method agenerate_text (line 112) | async def agenerate_text( method __repr__ (line 133) | def __repr__(self) -> str: FILE: src/ragas/llms/litellm_llm.py class LiteLLMStructuredLLM (line 14) | class LiteLLMStructuredLLM(InstructorBaseRagasLLM): method __init__ (line 24) | def __init__( method _check_client_async (line 58) | def _check_client_async(self) -> bool: method _run_async_in_current_loop (line 118) | def _run_async_in_current_loop(self, coro: t.Awaitable[t.Any]) -> t.Any: method generate (line 175) | def generate( method agenerate (line 220) | async def agenerate( method __repr__ (line 265) | def __repr__(self) -> str: FILE: src/ragas/llms/oci_genai_wrapper.py class OCIGenAIWrapper (line 35) | class OCIGenAIWrapper(BaseRagasLLM): method __init__ (line 43) | def __init__( method _convert_prompt_to_messages (line 101) | def _convert_prompt_to_messages(self, prompt: PromptValue) -> List[Dic... method _create_generation_request (line 146) | def _create_generation_request( method _get_client (line 172) | def _get_client(self): method generate_text (line 188) | def generate_text( method agenerate_text (line 239) | async def agenerate_text( method is_finished (line 295) | def is_finished(self, response: LLMResult) -> bool: method __repr__ (line 308) | def __repr__(self) -> str: function oci_genai_factory (line 312) | def oci_genai_factory( FILE: src/ragas/losses.py class Loss (line 8) | class Loss(ABC): method __call__ (line 14) | def __call__(self, predicted: t.List, actual: t.List) -> float: method __get_pydantic_core_schema__ (line 18) | def __get_pydantic_core_schema__( class MSELoss (line 30) | class MSELoss(Loss): method __call__ (line 37) | def __call__(self, predicted: t.List[float], actual: t.List[float]) ->... class BinaryMetricLoss (line 47) | class BinaryMetricLoss(Loss): method __call__ (line 55) | def __call__(self, predicted: t.List[int], actual: t.List[int]) -> float: method _accuracy (line 81) | def _accuracy(self, predicted: list[int], actual: t.List[int]) -> float: method _f1_score (line 93) | def _f1_score(self, predicted: t.List[int], actual: t.List[int]) -> fl... FILE: src/ragas/messages.py class Message (line 6) | class Message(BaseModel): class ToolCall (line 22) | class ToolCall(BaseModel): class HumanMessage (line 39) | class HumanMessage(Message): method pretty_repr (line 56) | def pretty_repr(self): class ToolMessage (line 61) | class ToolMessage(Message): method pretty_repr (line 78) | def pretty_repr(self): class AIMessage (line 83) | class AIMessage(Message): method to_dict (line 108) | def to_dict(self, **kwargs): method pretty_repr (line 122) | def pretty_repr(self): FILE: src/ragas/metrics/__init__.py function __getattr__ (line 191) | def __getattr__(name: str): FILE: src/ragas/metrics/_answer_correctness.py class QuestionAnswerGroundTruth (line 34) | class QuestionAnswerGroundTruth(BaseModel): class StatementsWithReason (line 40) | class StatementsWithReason(BaseModel): class ClassificationWithReason (line 45) | class ClassificationWithReason(BaseModel): class CorrectnessClassifier (line 51) | class CorrectnessClassifier( class AnswerCorrectness (line 141) | class AnswerCorrectness(MetricWithLLM, MetricWithEmbeddings, SingleTurnM... method __post_init__ (line 173) | def __post_init__(self): method init (line 188) | def init(self, run_config: RunConfig): method _compute_statement_presence (line 193) | def _compute_statement_presence( method _create_simplified_statements (line 202) | async def _create_simplified_statements( method _single_turn_ascore (line 216) | async def _single_turn_ascore( method _ascore (line 223) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_answer_relevance.py class ResponseRelevanceOutput (line 26) | class ResponseRelevanceOutput(BaseModel): class ResponseRelevanceInput (line 31) | class ResponseRelevanceInput(BaseModel): class ResponseRelevancePrompt (line 35) | class ResponseRelevancePrompt( class ResponseRelevancy (line 64) | class ResponseRelevancy(MetricWithLLM, MetricWithEmbeddings, SingleTurnM... method calculate_similarity (line 96) | def calculate_similarity(self, question: str, generated_questions: lis... method _calculate_score (line 114) | def _calculate_score( method _single_turn_ascore (line 131) | async def _single_turn_ascore( method _ascore (line 137) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: class AnswerRelevancy (line 149) | class AnswerRelevancy(ResponseRelevancy): method _ascore (line 150) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_answer_similarity.py class SemanticSimilarity (line 26) | class SemanticSimilarity(MetricWithEmbeddings, SingleTurnMetric): method __post_init__ (line 53) | def __post_init__(self): method _single_turn_ascore (line 61) | async def _single_turn_ascore( method _ascore (line 67) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: class AnswerSimilarity (line 109) | class AnswerSimilarity(SemanticSimilarity): method _ascore (line 112) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_aspect_critic.py class AspectCriticOutput (line 27) | class AspectCriticOutput(BaseModel): class AspectCriticInput (line 32) | class AspectCriticInput(BaseModel): class MultiTurnAspectCriticInput (line 50) | class MultiTurnAspectCriticInput(BaseModel): class SingleTurnAspectCriticPrompt (line 59) | class SingleTurnAspectCriticPrompt( class MultiTurnAspectCriticPrompt (line 67) | class MultiTurnAspectCriticPrompt( class AspectCritic (line 75) | class AspectCritic(MetricWithLLM, SingleTurnMetric, MultiTurnMetric): method __init__ (line 92) | def __init__( method __repr__ (line 140) | def __repr__(self) -> str: method definition (line 144) | def definition(self) -> str: method definition (line 148) | def definition(self, value: str) -> None: method _compute_score (line 155) | def _compute_score( method _single_turn_ascore (line 167) | async def _single_turn_ascore( method _ascore (line 173) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: method _multi_turn_ascore (line 198) | async def _multi_turn_ascore( FILE: src/ragas/metrics/_bleu_score.py class BleuScore (line 12) | class BleuScore(SingleTurnMetric): method __post_init__ (line 19) | def __post_init__(self): method init (line 28) | def init(self, run_config: RunConfig): method _single_turn_ascore (line 31) | async def _single_turn_ascore( method _ascore (line 47) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_chrf_score.py class ChrfScore (line 12) | class ChrfScore(SingleTurnMetric): method __post_init__ (line 19) | def __post_init__(self): method init (line 28) | def init(self, run_config: RunConfig): method _single_turn_ascore (line 31) | async def _single_turn_ascore( method _ascore (line 54) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_context_entities_recall.py class EntitiesList (line 25) | class EntitiesList(BaseModel): class ExtractEntitiesPrompt (line 29) | class ExtractEntitiesPrompt(PydanticPrompt[StringIO, EntitiesList]): class ContextEntityRecall (line 91) | class ContextEntityRecall(MetricWithLLM, SingleTurnMetric): method _compute_score (line 125) | def _compute_score( method get_entities (line 133) | async def get_entities( method _single_turn_ascore (line 148) | async def _single_turn_ascore( method _ascore (line 154) | async def _ascore( FILE: src/ragas/metrics/_context_precision.py class QAC (line 28) | class QAC(BaseModel): class Verification (line 34) | class Verification(BaseModel): class ContextPrecisionPrompt (line 39) | class ContextPrecisionPrompt(PydanticPrompt[QAC, Verification]): class LLMContextPrecisionWithReference (line 82) | class LLMContextPrecisionWithReference(MetricWithLLM, SingleTurnMetric): method _get_row_attributes (line 110) | def _get_row_attributes(self, row: t.Dict) -> t.Tuple[str, t.List[str]... method _calculate_average_precision (line 113) | def _calculate_average_precision( method _single_turn_ascore (line 134) | async def _single_turn_ascore( method _ascore (line 140) | async def _ascore( class LLMContextPrecisionWithoutReference (line 174) | class LLMContextPrecisionWithoutReference(LLMContextPrecisionWithReferen... method _get_row_attributes (line 182) | def _get_row_attributes(self, row: t.Dict) -> t.Tuple[str, t.List[str]... class NonLLMContextPrecisionWithReference (line 187) | class NonLLMContextPrecisionWithReference(SingleTurnMetric): method __post_init__ (line 202) | def __post_init__(self): method init (line 208) | def init(self, run_config: RunConfig) -> None: ... method _ascore (line 210) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: method _single_turn_ascore (line 214) | async def _single_turn_ascore( method _calculate_average_precision (line 237) | def _calculate_average_precision(self, verdict_list: t.List[int]) -> f... class IDBasedContextPrecision (line 251) | class IDBasedContextPrecision(SingleTurnMetric): method init (line 275) | def init(self, run_config: RunConfig) -> None: ... method _single_turn_ascore (line 277) | async def _single_turn_ascore( method _ascore (line 306) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: class ContextPrecision (line 311) | class ContextPrecision(LLMContextPrecisionWithReference): method _single_turn_ascore (line 314) | async def _single_turn_ascore( class ContextUtilization (line 321) | class ContextUtilization(LLMContextPrecisionWithoutReference): method _single_turn_ascore (line 324) | async def _single_turn_ascore( FILE: src/ragas/metrics/_context_recall.py class QCA (line 29) | class QCA(BaseModel): class ContextRecallClassification (line 35) | class ContextRecallClassification(BaseModel): class ContextRecallClassifications (line 41) | class ContextRecallClassifications(BaseModel): class ContextRecallClassificationPrompt (line 45) | class ContextRecallClassificationPrompt( class LLMContextRecall (line 88) | class LLMContextRecall(MetricWithLLM, SingleTurnMetric): method _compute_score (line 114) | def _compute_score(self, responses: t.List[ContextRecallClassification... method _single_turn_ascore (line 125) | async def _single_turn_ascore( method _ascore (line 131) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: class ContextRecall (line 160) | class ContextRecall(LLMContextRecall): class NonLLMContextRecall (line 165) | class NonLLMContextRecall(SingleTurnMetric): method init (line 181) | def init(self, run_config: RunConfig) -> None: ... method distance_measure (line 184) | def distance_measure(self) -> SingleTurnMetric: method distance_measure (line 188) | def distance_measure(self, distance_measure: DistanceMeasure) -> None: method _single_turn_ascore (line 193) | async def _single_turn_ascore( method _ascore (line 215) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: method _compute_score (line 218) | def _compute_score(self, verdict_list: t.List[float]) -> float: class IDBasedContextRecall (line 227) | class IDBasedContextRecall(SingleTurnMetric): method init (line 251) | def init(self, run_config: RunConfig) -> None: ... method _single_turn_ascore (line 253) | async def _single_turn_ascore( method _ascore (line 281) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_datacompy_score.py class DataCompyScore (line 17) | class DataCompyScore(SingleTurnMetric): method __post_init__ (line 25) | def __post_init__(self): method init (line 42) | def init(self, run_config: RunConfig): method _single_turn_ascore (line 45) | async def _single_turn_ascore( method _ascore (line 77) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_domain_specific_rubrics.py class ScoreFeedback (line 43) | class ScoreFeedback(BaseModel): class SingleTurnInputWithoutRubric (line 48) | class SingleTurnInputWithoutRubric(BaseModel): class MultiTurnInputWithoutRubric (line 66) | class MultiTurnInputWithoutRubric(BaseModel): class SingleTurnPrompt (line 73) | class SingleTurnPrompt(PydanticPrompt[SingleTurnInputWithoutRubric, Scor... class MultiTurnPrompt (line 79) | class MultiTurnPrompt(PydanticPrompt[MultiTurnInputWithoutRubric, ScoreF... class RubricsScore (line 85) | class RubricsScore(MetricWithLLM, SingleTurnMetric, MultiTurnMetric): method __init__ (line 86) | def __init__( method __repr__ (line 129) | def __repr__(self) -> str: method _single_turn_ascore (line 132) | async def _single_turn_ascore( method _ascore (line 137) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: method _multi_turn_ascore (line 161) | async def _multi_turn_ascore( FILE: src/ragas/metrics/_factual_correctness.py class ClaimDecompositionInput (line 31) | class ClaimDecompositionInput(BaseModel): class ClaimDecompositionOutput (line 35) | class ClaimDecompositionOutput(BaseModel): class DecompositionType (line 40) | class DecompositionType(Enum): class ClaimDecompositionPrompt (line 154) | class ClaimDecompositionPrompt( class FactualCorrectness (line 166) | class FactualCorrectness(MetricWithLLM, SingleTurnMetric): method __post_init__ (line 202) | def __post_init__(self): method decompose_claims (line 225) | async def decompose_claims( method verify_claims (line 236) | async def verify_claims( method _get_passthrough_value (line 253) | async def _get_passthrough_value(value: T) -> T: method _single_turn_ascore (line 256) | async def _single_turn_ascore( method decompose_and_verify_claims (line 298) | async def decompose_and_verify_claims( method _ascore (line 306) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_faithfulness.py class StatementGeneratorInput (line 25) | class StatementGeneratorInput(BaseModel): class StatementGeneratorOutput (line 30) | class StatementGeneratorOutput(BaseModel): class StatementGeneratorPrompt (line 34) | class StatementGeneratorPrompt( class StatementFaithfulnessAnswer (line 58) | class StatementFaithfulnessAnswer(BaseModel): class NLIStatementOutput (line 64) | class NLIStatementOutput(BaseModel): class NLIStatementInput (line 68) | class NLIStatementInput(BaseModel): class NLIStatementPrompt (line 73) | class NLIStatementPrompt(PydanticPrompt[NLIStatementInput, NLIStatementO... class Faithfulness (line 134) | class Faithfulness(MetricWithLLM, SingleTurnMetric): method _create_verdicts (line 152) | async def _create_verdicts( method _create_statements (line 166) | async def _create_statements( method _compute_score (line 182) | def _compute_score(self, answers: NLIStatementOutput): method _single_turn_ascore (line 196) | async def _single_turn_ascore( method _ascore (line 202) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: class FaithfulnesswithHHEM (line 218) | class FaithfulnesswithHHEM(Faithfulness): method __post_init__ (line 223) | def __post_init__(self): method _create_pairs (line 236) | def _create_pairs( method _create_batch (line 246) | def _create_batch( method _ascore (line 253) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_goal_accuracy.py class WorkflowOutput (line 21) | class WorkflowOutput(BaseModel): class CompareOutcomeInput (line 30) | class CompareOutcomeInput(BaseModel): class CompareOutcomeOutput (line 39) | class CompareOutcomeOutput(BaseModel): class WorkflowInput (line 48) | class WorkflowInput(BaseModel): class InferGoalOutcomePrompt (line 54) | class InferGoalOutcomePrompt(PydanticPrompt[WorkflowInput, WorkflowOutpu... class CompareOutcomePrompt (line 85) | class CompareOutcomePrompt(PydanticPrompt[CompareOutcomeInput, CompareOu... class AgentGoalAccuracyWithReference (line 104) | class AgentGoalAccuracyWithReference(MetricWithLLM, MultiTurnMetric): method _ascore (line 123) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: method _multi_turn_ascore (line 126) | async def _multi_turn_ascore( class AgentGoalAccuracyWithoutReference (line 148) | class AgentGoalAccuracyWithoutReference(MetricWithLLM, MultiTurnMetric): method _ascore (line 165) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: method _multi_turn_ascore (line 168) | async def _multi_turn_ascore( FILE: src/ragas/metrics/_instance_specific_rubrics.py class SingleTurnInputWithRubric (line 28) | class SingleTurnInputWithRubric(SingleTurnInputWithoutRubric): class MultiTurnInputWithRubric (line 34) | class MultiTurnInputWithRubric(MultiTurnInputWithoutRubric): class SingleTurnPrompt (line 40) | class SingleTurnPrompt(PydanticPrompt[SingleTurnInputWithRubric, ScoreFe... class MultiTurnPrompt (line 46) | class MultiTurnPrompt(PydanticPrompt[MultiTurnInputWithRubric, ScoreFeed... class InstanceRubrics (line 52) | class InstanceRubrics(MetricWithLLM, SingleTurnMetric, MultiTurnMetric): method __init__ (line 53) | def __init__( method __repr__ (line 85) | def __repr__(self) -> str: method _ascore (line 88) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: method _single_turn_ascore (line 116) | async def _single_turn_ascore( method _multi_turn_ascore (line 122) | async def _multi_turn_ascore( FILE: src/ragas/metrics/_multi_modal_faithfulness.py class FaithfulnessInput (line 22) | class FaithfulnessInput(BaseModel): method to_string_list (line 26) | def to_string_list(self): class FaithfulnessOutput (line 34) | class FaithfulnessOutput(BaseModel): class MultiModalFaithfulnessPrompt (line 38) | class MultiModalFaithfulnessPrompt( class MultiModalFaithfulness (line 72) | class MultiModalFaithfulness(MetricWithLLM, SingleTurnMetric): method _ascore (line 85) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: method _single_turn_ascore (line 97) | async def _single_turn_ascore( FILE: src/ragas/metrics/_multi_modal_relevance.py class RelevanceInput (line 22) | class RelevanceInput(BaseModel): method to_string_list (line 27) | def to_string_list(self): class RelevanceOutput (line 35) | class RelevanceOutput(BaseModel): class MultiModalRelevancePrompt (line 39) | class MultiModalRelevancePrompt(ImageTextPrompt[RelevanceInput, Relevanc... class MultiModalRelevance (line 77) | class MultiModalRelevance(MetricWithLLM, SingleTurnMetric): method _ascore (line 92) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: method _single_turn_ascore (line 106) | async def _single_turn_ascore( FILE: src/ragas/metrics/_noise_sensitivity.py class NoiseSensitivity (line 32) | class NoiseSensitivity(MetricWithLLM, SingleTurnMetric): method __post_init__ (line 52) | def __post_init__(self): method _evaluate_statement_faithfulness (line 58) | async def _evaluate_statement_faithfulness( method _decompose_answer_into_statements (line 74) | async def _decompose_answer_into_statements( method _compute_score (line 87) | def _compute_score(self, answers: t.Dict) -> float: method _single_turn_ascore (line 113) | async def _single_turn_ascore( method _ascore (line 119) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_nv_metrics.py class AnswerAccuracy (line 19) | class AnswerAccuracy(MetricWithLLM, SingleTurnMetric): method process_score (line 85) | def process_score(self, response): method average_scores (line 91) | def average_scores(self, score0, score1): method _single_turn_ascore (line 99) | async def _single_turn_ascore( class ContextRelevance (line 167) | class ContextRelevance(MetricWithLLM, SingleTurnMetric): method process_score (line 220) | def process_score(self, response): method average_scores (line 226) | def average_scores(self, score0, score1): method _single_turn_ascore (line 234) | async def _single_turn_ascore( class ResponseGroundedness (line 302) | class ResponseGroundedness(MetricWithLLM, SingleTurnMetric): method process_score (line 354) | def process_score(self, response): method average_scores (line 360) | def average_scores(self, score0, score1): method _single_turn_ascore (line 368) | async def _single_turn_ascore( FILE: src/ragas/metrics/_rouge_score.py class RougeScore (line 12) | class RougeScore(SingleTurnMetric): method __post_init__ (line 20) | def __post_init__(self): method init (line 29) | def init(self, run_config: RunConfig): method _single_turn_ascore (line 32) | async def _single_turn_ascore( method _ascore (line 41) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_simple_criteria.py class SimpleCriteriaOutput (line 28) | class SimpleCriteriaOutput(BaseModel): class SingleTurnSimpleCriteriaInput (line 33) | class SingleTurnSimpleCriteriaInput(BaseModel): class MultiTurnSimpleCriteriaInput (line 51) | class MultiTurnSimpleCriteriaInput(BaseModel): class SingleTurnSimpleCriteriaPrompt (line 58) | class SingleTurnSimpleCriteriaPrompt( class MultiTurnSimpleCriteriaPrompt (line 66) | class MultiTurnSimpleCriteriaPrompt( class SimpleCriteriaScore (line 74) | class SimpleCriteriaScore(MetricWithLLM, SingleTurnMetric, MultiTurnMetr... method __init__ (line 90) | def __init__( method __repr__ (line 137) | def __repr__(self) -> str: method definition (line 141) | def definition(self) -> str: method definition (line 145) | def definition(self, value: str) -> None: method _compute_score (line 152) | def _compute_score( method _single_turn_ascore (line 164) | async def _single_turn_ascore( method _ascore (line 170) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: method _multi_turn_ascore (line 195) | async def _multi_turn_ascore( FILE: src/ragas/metrics/_sql_semantic_equivalence.py class EquivalenceInput (line 25) | class EquivalenceInput(BaseModel): class EquivalenceOutput (line 31) | class EquivalenceOutput(BaseModel): class EquivalencePrompt (line 43) | class EquivalencePrompt(PydanticPrompt[EquivalenceInput, EquivalenceOutp... class LLMSQLEquivalence (line 71) | class LLMSQLEquivalence(MetricWithLLM, SingleTurnMetric): method _single_turn_ascore (line 81) | async def _single_turn_ascore( method _ascore (line 102) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_string.py class DistanceMeasure (line 12) | class DistanceMeasure(Enum): class ExactMatch (line 20) | class ExactMatch(SingleTurnMetric): method init (line 26) | def init(self, run_config: RunConfig): method _single_turn_ascore (line 29) | async def _single_turn_ascore( method _ascore (line 34) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: class StringPresence (line 39) | class StringPresence(SingleTurnMetric): method init (line 45) | def init(self, run_config: RunConfig): method _single_turn_ascore (line 48) | async def _single_turn_ascore( method _ascore (line 57) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: class NonLLMStringSimilarity (line 62) | class NonLLMStringSimilarity(SingleTurnMetric): method __post_init__ (line 69) | def __post_init__(self): method init (line 84) | def init(self, run_config: RunConfig): method _single_turn_ascore (line 87) | async def _single_turn_ascore( method _ascore (line 98) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_summarization.py class ExtractedKeyphrases (line 25) | class ExtractedKeyphrases(BaseModel): class QuestionsGenerated (line 29) | class QuestionsGenerated(BaseModel): class AnswersGenerated (line 33) | class AnswersGenerated(BaseModel): class ExtractKeyphrasePrompt (line 37) | class ExtractKeyphrasePrompt(PydanticPrompt[StringIO, ExtractedKeyphrase... class GenerateQuestionsPromptInput (line 61) | class GenerateQuestionsPromptInput(BaseModel): class GenerateQuestionsPrompt (line 66) | class GenerateQuestionsPrompt( class SummaryAndQuestions (line 100) | class SummaryAndQuestions(BaseModel): class GenerateAnswersPrompt (line 105) | class GenerateAnswersPrompt(PydanticPrompt[SummaryAndQuestions, AnswersG... class SummarizationScore (line 144) | class SummarizationScore(MetricWithLLM, SingleTurnMetric): method _single_turn_ascore (line 168) | async def _single_turn_ascore( method _ascore (line 174) | async def _ascore(self, row: Dict, callbacks: Callbacks) -> float: method _compute_score (line 189) | def _compute_score(self, scores) -> float: method _compute_qa_score (line 195) | def _compute_qa_score(self, answers: t.List[str]) -> float: method _compute_conciseness_score (line 199) | def _compute_conciseness_score(self, text, summary) -> float: method _extract_keyphrases (line 202) | async def _extract_keyphrases(self, text: str, callbacks: Callbacks) -... method _get_questions (line 214) | async def _get_questions( method _get_answers (line 229) | async def _get_answers( FILE: src/ragas/metrics/_tool_call_accuracy.py class ToolCallAccuracy (line 17) | class ToolCallAccuracy(MultiTurnMetric): method init (line 62) | def init(self, run_config): method _get_arg_score (line 65) | async def _get_arg_score( method _sorted_key_for_tool_call (line 86) | def _sorted_key_for_tool_call(tc: ToolCall) -> t.Tuple[str, ...]: method is_sequence_aligned (line 101) | def is_sequence_aligned( method _multi_turn_ascore (line 110) | async def _multi_turn_ascore( method _ascore (line 180) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_tool_call_f1.py function _make_hashable (line 14) | def _make_hashable(obj: t.Any) -> t.Any: class ToolCallF1 (line 26) | class ToolCallF1(MultiTurnMetric): method init (line 39) | def init(self, run_config): method _multi_turn_ascore (line 42) | async def _multi_turn_ascore( method _ascore (line 70) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/_topic_adherence.py class TopicExtractionInput (line 25) | class TopicExtractionInput(BaseModel): class TopicExtractionOutput (line 29) | class TopicExtractionOutput(BaseModel): class TopicRefusedInput (line 33) | class TopicRefusedInput(BaseModel): class TopicRefusedOutput (line 38) | class TopicRefusedOutput(BaseModel): class TopicClassificationInput (line 44) | class TopicClassificationInput(BaseModel): class TopicClassificationOutput (line 49) | class TopicClassificationOutput(BaseModel): class TopicClassificationPrompt (line 53) | class TopicClassificationPrompt( class TopicRefusedPrompt (line 73) | class TopicRefusedPrompt(PydanticPrompt[TopicRefusedInput, TopicRefusedO... class TopicExtractionPrompt (line 101) | class TopicExtractionPrompt( class TopicAdherenceScore (line 136) | class TopicAdherenceScore(MetricWithLLM, MultiTurnMetric): method _multi_turn_ascore (line 152) | async def _multi_turn_ascore( method _ascore (line 250) | async def _ascore(self, row: t.Dict, callbacks: Callbacks) -> float: FILE: src/ragas/metrics/base.py class MetricType (line 51) | class MetricType(Enum): class MetricOutputType (line 67) | class MetricOutputType(Enum): class Metric (line 75) | class Metric(ABC): method __post_init__ (line 91) | def __post_init__(self): method required_columns (line 96) | def required_columns(self) -> t.Dict[str, t.Set[str]]: method required_columns (line 108) | def required_columns(self, required_columns: t.Dict[MetricType, t.Set[... method get_required_columns (line 120) | def get_required_columns( method init (line 142) | def init(self, run_config: RunConfig) -> None: class MetricWithLLM (line 155) | class MetricWithLLM(Metric, PromptMixin): method init (line 169) | def init(self, run_config: RunConfig) -> None: method _optimize_instruction (line 191) | def _optimize_instruction( method _optimize_demonstration (line 249) | def _optimize_demonstration( method train (line 307) | def train( class MetricWithEmbeddings (line 379) | class MetricWithEmbeddings(Metric): method init (line 382) | def init(self, run_config: RunConfig): class SingleTurnMetric (line 392) | class SingleTurnMetric(Metric): method _only_required_columns_single_turn (line 399) | def _only_required_columns_single_turn( method single_turn_score (line 412) | def single_turn_score( method single_turn_ascore (line 460) | async def single_turn_ascore( method _single_turn_ascore (line 505) | async def _single_turn_ascore( class MultiTurnMetric (line 516) | class MultiTurnMetric(Metric): method _only_required_columns_multi_turn (line 524) | def _only_required_columns_multi_turn( method multi_turn_score (line 537) | def multi_turn_score( method multi_turn_ascore (line 584) | async def multi_turn_ascore( method _multi_turn_ascore (line 630) | async def _multi_turn_ascore( class Ensember (line 641) | class Ensember: method from_discrete (line 646) | def from_discrete( class ModeMetric (line 680) | class ModeMetric(t.Protocol): class SimpleBaseMetric (line 689) | class SimpleBaseMetric(ABC): method score (line 721) | def score(self, **kwargs) -> "MetricResult": method ascore (line 738) | async def ascore(self, **kwargs) -> "MetricResult": method batch_score (line 754) | def batch_score( method abatch_score (line 773) | async def abatch_score( function create_auto_response_model (line 799) | def create_auto_response_model(name: str, **fields) -> t.Type["BaseModel"]: class SimpleLLMMetric (line 846) | class SimpleLLMMetric(SimpleBaseMetric): method __post_init__ (line 852) | def __post_init__(self): method get_variables (line 858) | def get_variables(self) -> t.List[str]: method score (line 874) | def score(self, **kwargs) -> "MetricResult": method ascore (line 892) | async def ascore(self, **kwargs) -> "MetricResult": method batch_score (line 913) | def batch_score( method abatch_score (line 924) | async def abatch_score( method save (line 935) | def save(self, path: t.Optional[str] = None) -> None: method _serialize_prompt (line 1023) | def _serialize_prompt(self, warning_messages: t.List[str]) -> t.Dict[s... method _get_metric_config (line 1057) | def _get_metric_config(self) -> t.Dict[str, t.Any]: method _serialize_response_model_info (line 1067) | def _serialize_response_model_info(self) -> t.Optional[t.Dict]: method _read_metric_type (line 1084) | def _read_metric_type(cls, path: str) -> t.Dict[str, t.Any]: method _validate_metric_type (line 1121) | def _validate_metric_type(cls, path: str) -> None: method load (line 1146) | def load( method _deserialize_prompt (line 1215) | def _deserialize_prompt( method get_correlation (line 1276) | def get_correlation( method align_and_validate (line 1285) | def align_and_validate( method align (line 1310) | def align( method validate_alignment (line 1395) | def validate_alignment( method __repr__ (line 1445) | def __repr__(self) -> str: FILE: src/ragas/metrics/collections/_bleu_score.py class BleuScore (line 9) | class BleuScore(BaseMetric): method __init__ (line 38) | def __init__( method ascore (line 48) | async def ascore( FILE: src/ragas/metrics/collections/_rouge_score.py class RougeScore (line 9) | class RougeScore(BaseMetric): method __init__ (line 44) | def __init__( method ascore (line 56) | async def ascore( FILE: src/ragas/metrics/collections/_semantic_similarity.py class SemanticSimilarity (line 14) | class SemanticSimilarity(BaseMetric): method __init__ (line 56) | def __init__( method ascore (line 69) | async def ascore(self, reference: str, response: str) -> MetricResult: FILE: src/ragas/metrics/collections/_string.py class DistanceMeasure (line 9) | class DistanceMeasure(Enum): class ExactMatch (line 16) | class ExactMatch(BaseMetric): method __init__ (line 44) | def __init__( method ascore (line 52) | async def ascore( class StringPresence (line 71) | class StringPresence(BaseMetric): method __init__ (line 99) | def __init__( method ascore (line 107) | async def ascore( class NonLLMStringSimilarity (line 133) | class NonLLMStringSimilarity(BaseMetric): method __init__ (line 162) | def __init__( method ascore (line 187) | async def ascore( FILE: src/ragas/metrics/collections/agent_goal_accuracy/metric.py class AgentGoalAccuracyWithReference (line 23) | class AgentGoalAccuracyWithReference(BaseMetric): method __init__ (line 63) | def __init__( method ascore (line 75) | async def ascore( method _format_conversation (line 107) | def _format_conversation( method _infer_goal_outcome (line 116) | async def _infer_goal_outcome(self, conversation: str) -> WorkflowOutput: method _compare_outcomes (line 122) | async def _compare_outcomes(self, desired: str, arrived: str) -> int: class AgentGoalAccuracyWithoutReference (line 132) | class AgentGoalAccuracyWithoutReference(BaseMetric): method __init__ (line 172) | def __init__( method ascore (line 184) | async def ascore( method _format_conversation (line 212) | def _format_conversation( method _infer_goal_outcome (line 221) | async def _infer_goal_outcome(self, conversation: str) -> WorkflowOutput: method _compare_outcomes (line 227) | async def _compare_outcomes(self, desired: str, arrived: str) -> int: FILE: src/ragas/metrics/collections/agent_goal_accuracy/util.py class WorkflowInput (line 10) | class WorkflowInput(BaseModel): class WorkflowOutput (line 16) | class WorkflowOutput(BaseModel): class InferGoalOutcomePrompt (line 25) | class InferGoalOutcomePrompt(BasePrompt[WorkflowInput, WorkflowOutput]): class CompareOutcomeInput (line 58) | class CompareOutcomeInput(BaseModel): class CompareOutcomeOutput (line 67) | class CompareOutcomeOutput(BaseModel): class CompareOutcomePrompt (line 76) | class CompareOutcomePrompt(BasePrompt[CompareOutcomeInput, CompareOutcom... FILE: src/ragas/metrics/collections/answer_accuracy/metric.py class AnswerAccuracy (line 21) | class AnswerAccuracy(BaseMetric): method __init__ (line 67) | def __init__( method ascore (line 91) | async def ascore( method _get_judge_rating (line 132) | async def _get_judge_rating( method _average_scores (line 165) | def _average_scores(self, score1: float, score2: float) -> float: FILE: src/ragas/metrics/collections/answer_accuracy/util.py class AnswerAccuracyInput (line 8) | class AnswerAccuracyInput(BaseModel): class AnswerAccuracyOutput (line 16) | class AnswerAccuracyOutput(BaseModel): class AnswerAccuracyJudge1Prompt (line 22) | class AnswerAccuracyJudge1Prompt(BasePrompt[AnswerAccuracyInput, AnswerA... class AnswerAccuracyJudge2Prompt (line 63) | class AnswerAccuracyJudge2Prompt(BasePrompt[AnswerAccuracyInput, AnswerA... FILE: src/ragas/metrics/collections/answer_correctness/metric.py class AnswerCorrectness (line 25) | class AnswerCorrectness(BaseMetric): method __init__ (line 78) | def __init__( method _validate_embeddings (line 143) | def _validate_embeddings(self) -> None: method ascore (line 154) | async def ascore( method _generate_statements (line 198) | async def _generate_statements(self, question: str, text: str) -> List... method _classify_statements (line 205) | async def _classify_statements( method _compute_f1_score (line 221) | def _compute_f1_score(self, classification: ClassificationWithReason) ... method _calculate_similarity (line 251) | async def _calculate_similarity(self, response: str, reference: str) -... FILE: src/ragas/metrics/collections/answer_correctness/util.py class StatementGeneratorInput (line 10) | class StatementGeneratorInput(BaseModel): class StatementGeneratorOutput (line 19) | class StatementGeneratorOutput(BaseModel): class StatementGeneratorPrompt (line 27) | class StatementGeneratorPrompt( class StatementsWithReason (line 55) | class StatementsWithReason(BaseModel): class ClassificationWithReason (line 62) | class ClassificationWithReason(BaseModel): class CorrectnessClassifierInput (line 76) | class CorrectnessClassifierInput(BaseModel): class CorrectnessClassifierPrompt (line 84) | class CorrectnessClassifierPrompt( FILE: src/ragas/metrics/collections/answer_relevancy/metric.py class AnswerRelevancy (line 21) | class AnswerRelevancy(BaseMetric): method __init__ (line 66) | def __init__( method ascore (line 93) | async def ascore(self, user_input: str, response: str) -> MetricResult: FILE: src/ragas/metrics/collections/answer_relevancy/util.py class AnswerRelevanceInput (line 8) | class AnswerRelevanceInput(BaseModel): class AnswerRelevanceOutput (line 16) | class AnswerRelevanceOutput(BaseModel): class AnswerRelevancePrompt (line 28) | class AnswerRelevancePrompt(BasePrompt[AnswerRelevanceInput, AnswerRelev... FILE: src/ragas/metrics/collections/base.py class BaseMetric (line 13) | class BaseMetric(SimpleBaseMetric, NumericValidator): method __init__ (line 32) | def __init__( method ascore (line 48) | async def ascore(self, **kwargs) -> MetricResult: method score (line 61) | def score(self, **kwargs) -> MetricResult: method batch_score (line 84) | def batch_score( method _validate_llm (line 113) | def _validate_llm(self): method _validate_embeddings (line 123) | def _validate_embeddings(self): FILE: src/ragas/metrics/collections/chrf_score/metric.py class CHRFScore (line 9) | class CHRFScore(BaseMetric): method __init__ (line 44) | def __init__( method ascore (line 54) | async def ascore( FILE: src/ragas/metrics/collections/context_entity_recall/metric.py class ContextEntityRecall (line 19) | class ContextEntityRecall(BaseMetric): method __init__ (line 59) | def __init__( method ascore (line 80) | async def ascore( method _extract_entities (line 107) | async def _extract_entities(self, text: str) -> List[str]: method _compute_recall_score (line 123) | def _compute_recall_score( FILE: src/ragas/metrics/collections/context_entity_recall/util.py class ExtractEntitiesInput (line 10) | class ExtractEntitiesInput(BaseModel): class EntitiesList (line 16) | class EntitiesList(BaseModel): class ExtractEntitiesPrompt (line 24) | class ExtractEntitiesPrompt(BasePrompt[ExtractEntitiesInput, EntitiesLis... FILE: src/ragas/metrics/collections/context_precision/metric.py class ContextPrecisionWithReference (line 21) | class ContextPrecisionWithReference(BaseMetric): method __init__ (line 61) | def __init__( method ascore (line 81) | async def ascore( method _calculate_average_precision (line 118) | def _calculate_average_precision(self, verdicts: List[int]) -> float: class ContextPrecisionWithoutReference (line 141) | class ContextPrecisionWithoutReference(BaseMetric): method __init__ (line 181) | def __init__( method ascore (line 201) | async def ascore( method _calculate_average_precision (line 238) | def _calculate_average_precision(self, verdicts: List[int]) -> float: class ContextPrecision (line 261) | class ContextPrecision(ContextPrecisionWithReference): method __init__ (line 288) | def __init__( class ContextUtilization (line 297) | class ContextUtilization(ContextPrecisionWithoutReference): method __init__ (line 324) | def __init__( FILE: src/ragas/metrics/collections/context_precision/util.py class ContextPrecisionInput (line 8) | class ContextPrecisionInput(BaseModel): class ContextPrecisionOutput (line 18) | class ContextPrecisionOutput(BaseModel): class ContextPrecisionPrompt (line 25) | class ContextPrecisionPrompt(BasePrompt[ContextPrecisionInput, ContextPr... FILE: src/ragas/metrics/collections/context_recall/metric.py class ContextRecall (line 21) | class ContextRecall(BaseMetric): method __init__ (line 61) | def __init__( method ascore (line 82) | async def ascore( FILE: src/ragas/metrics/collections/context_recall/util.py class ContextRecallInput (line 10) | class ContextRecallInput(BaseModel): class ContextRecallClassification (line 20) | class ContextRecallClassification(BaseModel): class ContextRecallOutput (line 36) | class ContextRecallOutput(BaseModel): class ContextRecallPrompt (line 44) | class ContextRecallPrompt(BasePrompt[ContextRecallInput, ContextRecallOu... FILE: src/ragas/metrics/collections/context_relevance/metric.py class ContextRelevance (line 22) | class ContextRelevance(BaseMetric): method __init__ (line 68) | def __init__( method ascore (line 92) | async def ascore( method _get_judge_rating (line 142) | async def _get_judge_rating( method _average_scores (line 172) | def _average_scores(self, score1: float, score2: float) -> float: FILE: src/ragas/metrics/collections/context_relevance/util.py class ContextRelevanceInput (line 8) | class ContextRelevanceInput(BaseModel): class ContextRelevanceOutput (line 15) | class ContextRelevanceOutput(BaseModel): class ContextRelevanceJudge1Prompt (line 21) | class ContextRelevanceJudge1Prompt( class ContextRelevanceJudge2Prompt (line 66) | class ContextRelevanceJudge2Prompt( FILE: src/ragas/metrics/collections/datacompy_score/metric.py class DataCompyScore (line 15) | class DataCompyScore(BaseMetric): method __init__ (line 45) | def __init__( method ascore (line 80) | async def ascore( FILE: src/ragas/metrics/collections/domain_specific_rubrics/metric.py class DomainSpecificRubrics (line 21) | class DomainSpecificRubrics(BaseMetric): method __init__ (line 84) | def __init__( method ascore (line 112) | async def ascore( class RubricsScoreWithoutReference (line 149) | class RubricsScoreWithoutReference(DomainSpecificRubrics): method __init__ (line 156) | def __init__( class RubricsScoreWithReference (line 168) | class RubricsScoreWithReference(DomainSpecificRubrics): method __init__ (line 175) | def __init__( FILE: src/ragas/metrics/collections/domain_specific_rubrics/util.py class RubricScoreInput (line 26) | class RubricScoreInput(BaseModel): class RubricScoreOutput (line 46) | class RubricScoreOutput(BaseModel): class RubricScorePrompt (line 53) | class RubricScorePrompt(BasePrompt[RubricScoreInput, RubricScoreOutput]): function format_rubrics (line 87) | def format_rubrics(rubrics: t.Dict[str, str]) -> str: FILE: src/ragas/metrics/collections/example_metric.py class ExampleMetric (line 7) | class ExampleMetric(BaseMetric): method __init__ (line 21) | def __init__(self, name: str = "example_metric", **kwargs): method ascore (line 25) | async def ascore(self, user_input: str, response: str) -> MetricResult: FILE: src/ragas/metrics/collections/factual_correctness/metric.py class FactualCorrectness (line 25) | class FactualCorrectness(BaseMetric): method __init__ (line 75) | def __init__( method ascore (line 114) | async def ascore(self, response: str, reference: str) -> MetricResult: method _decompose_claims (line 167) | async def _decompose_claims(self, text: str) -> List[str]: method _verify_claims (line 176) | async def _verify_claims( method _decompose_and_verify_claims (line 185) | async def _decompose_and_verify_claims( FILE: src/ragas/metrics/collections/factual_correctness/util.py class ClaimDecompositionInput (line 15) | class ClaimDecompositionInput(BaseModel): class ClaimDecompositionOutput (line 25) | class ClaimDecompositionOutput(BaseModel): class ClaimDecompositionPrompt (line 31) | class ClaimDecompositionPrompt( method to_string (line 162) | def to_string(self, input_data: ClaimDecompositionInput) -> str: method adapt (line 176) | async def adapt( class NLIStatementInput (line 238) | class NLIStatementInput(BaseModel): class StatementFaithfulnessAnswer (line 247) | class StatementFaithfulnessAnswer(BaseModel): class NLIStatementOutput (line 255) | class NLIStatementOutput(BaseModel): class NLIStatementPrompt (line 261) | class NLIStatementPrompt(BasePrompt[NLIStatementInput, NLIStatementOutpu... FILE: src/ragas/metrics/collections/faithfulness/metric.py class Faithfulness (line 22) | class Faithfulness(BaseMetric): method __init__ (line 67) | def __init__( method ascore (line 88) | async def ascore( method _create_statements (line 132) | async def _create_statements(self, question: str, response: str) -> Li... method _create_verdicts (line 139) | async def _create_verdicts( method _compute_score (line 148) | def _compute_score(self, verdicts: NLIStatementOutput) -> float: FILE: src/ragas/metrics/collections/faithfulness/util.py class StatementGeneratorInput (line 10) | class StatementGeneratorInput(BaseModel): class StatementGeneratorOutput (line 19) | class StatementGeneratorOutput(BaseModel): class StatementGeneratorPrompt (line 27) | class StatementGeneratorPrompt( class StatementFaithfulnessAnswer (line 55) | class StatementFaithfulnessAnswer(BaseModel): class NLIStatementInput (line 63) | class NLIStatementInput(BaseModel): class NLIStatementOutput (line 72) | class NLIStatementOutput(BaseModel): class NLIStatementPrompt (line 80) | class NLIStatementPrompt(BasePrompt[NLIStatementInput, NLIStatementOutpu... FILE: src/ragas/metrics/collections/instance_specific_rubrics/metric.py class InstanceSpecificRubrics (line 18) | class InstanceSpecificRubrics(BaseMetric): method __init__ (line 66) | def __init__( method ascore (line 77) | async def ascore( FILE: src/ragas/metrics/collections/instance_specific_rubrics/util.py class InstanceRubricScoreInput (line 10) | class InstanceRubricScoreInput(BaseModel): class InstanceRubricScoreOutput (line 33) | class InstanceRubricScoreOutput(BaseModel): class InstanceRubricScorePrompt (line 40) | class InstanceRubricScorePrompt( FILE: src/ragas/metrics/collections/multi_modal_faithfulness/metric.py class MultiModalFaithfulness (line 19) | class MultiModalFaithfulness(BaseMetric): method __init__ (line 68) | def __init__( method ascore (line 84) | async def ascore( method _evaluate_faithfulness (line 127) | async def _evaluate_faithfulness( FILE: src/ragas/metrics/collections/multi_modal_faithfulness/util.py class MultiModalFaithfulnessInput (line 28) | class MultiModalFaithfulnessInput(BaseModel): class MultiModalFaithfulnessOutput (line 38) | class MultiModalFaithfulnessOutput(BaseModel): function is_image_path_or_url (line 54) | def is_image_path_or_url(item: str) -> bool: function process_image_to_base64 (line 84) | def process_image_to_base64(item: str) -> t.Optional[t.Dict[str, str]]: function _try_process_base64_uri (line 108) | def _try_process_base64_uri(item: str) -> t.Optional[t.Dict[str, str]]: function _try_process_url (line 123) | def _try_process_url(item: str) -> t.Optional[t.Dict[str, str]]: function _try_process_local_file (line 178) | def _try_process_local_file(item: str) -> t.Optional[t.Dict[str, str]]: function build_multimodal_message_content (line 213) | def build_multimodal_message_content( FILE: src/ragas/metrics/collections/multi_modal_relevance/metric.py class MultiModalRelevance (line 19) | class MultiModalRelevance(BaseMetric): method __init__ (line 69) | def __init__( method ascore (line 85) | async def ascore( method _evaluate_relevance (line 135) | async def _evaluate_relevance( FILE: src/ragas/metrics/collections/multi_modal_relevance/util.py class MultiModalRelevanceInput (line 13) | class MultiModalRelevanceInput(BaseModel): class MultiModalRelevanceOutput (line 24) | class MultiModalRelevanceOutput(BaseModel): function build_multimodal_relevance_message_content (line 37) | def build_multimodal_relevance_message_content( FILE: src/ragas/metrics/collections/noise_sensitivity/metric.py class NoiseSensitivity (line 24) | class NoiseSensitivity(BaseMetric): method __init__ (line 74) | def __init__( method ascore (line 104) | async def ascore( method _decompose_answer_into_statements (line 187) | async def _decompose_answer_into_statements( method _evaluate_statement_faithfulness (line 196) | async def _evaluate_statement_faithfulness( method _compute_score (line 209) | def _compute_score(self, answers: Dict) -> float: FILE: src/ragas/metrics/collections/noise_sensitivity/util.py class StatementGeneratorInput (line 11) | class StatementGeneratorInput(BaseModel): class StatementGeneratorOutput (line 18) | class StatementGeneratorOutput(BaseModel): class StatementGeneratorPrompt (line 24) | class StatementGeneratorPrompt( method to_string (line 32) | def to_string(self, input_data: StatementGeneratorInput) -> str: class StatementFaithfulnessInput (line 37) | class StatementFaithfulnessInput(BaseModel): class StatementFaithfulnessAnswer (line 44) | class StatementFaithfulnessAnswer(BaseModel): class StatementFaithfulnessOutput (line 52) | class StatementFaithfulnessOutput(BaseModel): class StatementFaithfulnessPrompt (line 58) | class StatementFaithfulnessPrompt( method to_string (line 66) | def to_string(self, input_data: StatementFaithfulnessInput) -> str: FILE: src/ragas/metrics/collections/quoted_spans/metric.py class QuotedSpansAlignment (line 11) | class QuotedSpansAlignment(BaseMetric): method __init__ (line 48) | def __init__( method ascore (line 68) | async def ascore( FILE: src/ragas/metrics/collections/quoted_spans/util.py function normalize_text (line 13) | def normalize_text(text: str) -> str: function extract_quoted_spans (line 18) | def extract_quoted_spans(answer: str, min_len: int = 3) -> t.List[str]: function count_matched_spans (line 38) | def count_matched_spans( FILE: src/ragas/metrics/collections/response_groundedness/metric.py class ResponseGroundedness (line 22) | class ResponseGroundedness(BaseMetric): method __init__ (line 68) | def __init__( method ascore (line 92) | async def ascore( method _get_judge_rating (line 134) | async def _get_judge_rating(self, prompt_obj, response: str, context: ... method _average_scores (line 164) | def _average_scores(self, score1: float, score2: float) -> float: FILE: src/ragas/metrics/collections/response_groundedness/util.py class ResponseGroundednessInput (line 8) | class ResponseGroundednessInput(BaseModel): class ResponseGroundednessOutput (line 15) | class ResponseGroundednessOutput(BaseModel): class ResponseGroundednessJudge1Prompt (line 21) | class ResponseGroundednessJudge1Prompt( class ResponseGroundednessJudge2Prompt (line 65) | class ResponseGroundednessJudge2Prompt( FILE: src/ragas/metrics/collections/sql_semantic_equivalence/metric.py class SQLSemanticEquivalence (line 15) | class SQLSemanticEquivalence(BaseMetric): method __init__ (line 53) | def __init__( method ascore (line 63) | async def ascore( FILE: src/ragas/metrics/collections/sql_semantic_equivalence/util.py class SQLEquivalenceInput (line 10) | class SQLEquivalenceInput(BaseModel): class SQLEquivalenceOutput (line 16) | class SQLEquivalenceOutput(BaseModel): class SQLEquivalencePrompt (line 28) | class SQLEquivalencePrompt(BasePrompt[SQLEquivalenceInput, SQLEquivalenc... FILE: src/ragas/metrics/collections/summary_score/metric.py class SummaryScore (line 26) | class SummaryScore(BaseMetric): method __init__ (line 77) | def __init__( method ascore (line 109) | async def ascore( method _extract_keyphrases (line 166) | async def _extract_keyphrases(self, text: str) -> List[str]: method _generate_questions (line 173) | async def _generate_questions(self, text: str, keyphrases: List[str]) ... method _generate_answers (line 180) | async def _generate_answers(self, summary: str, questions: List[str]) ... method _compute_qa_score (line 187) | def _compute_qa_score(self, answers: List[str]) -> float: method _compute_conciseness_score (line 194) | def _compute_conciseness_score(self, text: str, summary: str) -> float: FILE: src/ragas/metrics/collections/summary_score/util.py class ExtractedKeyphrasesInput (line 10) | class ExtractedKeyphrasesInput(BaseModel): class ExtractedKeyphrases (line 16) | class ExtractedKeyphrases(BaseModel): class ExtractKeyphrasesPrompt (line 22) | class ExtractKeyphrasesPrompt( class GenerateQuestionsInput (line 51) | class GenerateQuestionsInput(BaseModel): class QuestionsGenerated (line 60) | class QuestionsGenerated(BaseModel): class GenerateQuestionsPrompt (line 66) | class GenerateQuestionsPrompt(BasePrompt[GenerateQuestionsInput, Questio... class GenerateAnswersInput (line 101) | class GenerateAnswersInput(BaseModel): class AnswersGenerated (line 110) | class AnswersGenerated(BaseModel): class GenerateAnswersPrompt (line 118) | class GenerateAnswersPrompt(BasePrompt[GenerateAnswersInput, AnswersGene... FILE: src/ragas/metrics/collections/tool_call_accuracy/metric.py class ToolCallAccuracy (line 17) | class ToolCallAccuracy(BaseMetric): method __init__ (line 62) | def __init__( method _is_sequence_aligned (line 80) | def _is_sequence_aligned( method ascore (line 89) | async def ascore( FILE: src/ragas/metrics/collections/tool_call_accuracy/util.py function sorted_key_for_tool_call (line 8) | def sorted_key_for_tool_call(tc: ToolCall) -> t.Tuple[str, ...]: function exact_match_args (line 24) | def exact_match_args( FILE: src/ragas/metrics/collections/tool_call_f1/metric.py class ToolCallF1 (line 15) | class ToolCallF1(BaseMetric): method __init__ (line 59) | def __init__(self, name: str = "tool_call_f1", **kwargs): method ascore (line 69) | async def ascore( FILE: src/ragas/metrics/collections/tool_call_f1/util.py function make_hashable (line 8) | def make_hashable(obj: t.Any) -> t.Any: function tool_call_to_hashable (line 34) | def tool_call_to_hashable(tc: ToolCall) -> t.Tuple[str, t.FrozenSet]: function calculate_f1_score (line 47) | def calculate_f1_score( FILE: src/ragas/metrics/collections/topic_adherence/metric.py class TopicAdherence (line 28) | class TopicAdherence(BaseMetric): method __init__ (line 75) | def __init__( method ascore (line 90) | async def ascore( method _format_conversation (line 129) | def _format_conversation( method _extract_topics (line 138) | async def _extract_topics(self, conversation: str) -> List[str]: method _check_topics_answered (line 145) | async def _check_topics_answered( method _classify_topics (line 158) | async def _classify_topics( method _safe_bool_conversion (line 180) | def _safe_bool_conversion(self, classifications: List) -> np.ndarray: method _compute_score (line 201) | def _compute_score( FILE: src/ragas/metrics/collections/topic_adherence/util.py class TopicExtractionInput (line 10) | class TopicExtractionInput(BaseModel): class TopicExtractionOutput (line 16) | class TopicExtractionOutput(BaseModel): class TopicExtractionPrompt (line 22) | class TopicExtractionPrompt(BasePrompt[TopicExtractionInput, TopicExtrac... class TopicRefusedInput (line 58) | class TopicRefusedInput(BaseModel): class TopicRefusedOutput (line 65) | class TopicRefusedOutput(BaseModel): class TopicRefusedPrompt (line 71) | class TopicRefusedPrompt(BasePrompt[TopicRefusedInput, TopicRefusedOutpu... class TopicClassificationInput (line 103) | class TopicClassificationInput(BaseModel): class TopicClassificationOutput (line 110) | class TopicClassificationOutput(BaseModel): class TopicClassificationPrompt (line 117) | class TopicClassificationPrompt( FILE: src/ragas/metrics/decorator.py class BaseMetricProtocol (line 37) | class BaseMetricProtocol(Protocol): method score (line 42) | def score(self, **kwargs) -> MetricResult: method ascore (line 46) | async def ascore(self, **kwargs) -> MetricResult: method batch_score (line 50) | def batch_score(self, inputs: t.List[t.Dict[str, t.Any]]) -> t.List[Me... method abatch_score (line 54) | async def abatch_score( method __call__ (line 60) | def __call__(self, *args, **kwargs): class DiscreteMetricProtocol (line 65) | class DiscreteMetricProtocol(BaseMetricProtocol, Protocol): class NumericMetricProtocol (line 71) | class NumericMetricProtocol(BaseMetricProtocol, Protocol): class RankingMetricProtocol (line 77) | class RankingMetricProtocol(BaseMetricProtocol, Protocol): function create_metric_decorator (line 83) | def create_metric_decorator(): FILE: src/ragas/metrics/discrete.py class DiscreteMetric (line 19) | class DiscreteMetric(SimpleLLMMetric, DiscreteValidator): method __post_init__ (line 63) | def __post_init__(self): method get_correlation (line 75) | def get_correlation( method load (line 92) | def load( function discrete_metric (line 128) | def discrete_metric( FILE: src/ragas/metrics/numeric.py class NumericMetric (line 17) | class NumericMetric(SimpleLLMMetric, NumericValidator): method __post_init__ (line 64) | def __post_init__(self): method get_correlation (line 73) | def get_correlation( method load (line 96) | def load( function numeric_metric (line 145) | def numeric_metric( FILE: src/ragas/metrics/quoted_spans.py function _normalize (line 27) | def _normalize(text: str) -> str: function _extract_quoted_spans (line 32) | def _extract_quoted_spans(answer: str, *, min_len: int = 3) -> Sequence[... function quoted_spans_alignment (line 59) | def quoted_spans_alignment( FILE: src/ragas/metrics/ranking.py class RankingMetric (line 19) | class RankingMetric(SimpleLLMMetric, RankingValidator): method __post_init__ (line 65) | def __post_init__(self): method get_correlation (line 76) | def get_correlation( method load (line 99) | def load( function ranking_metric (line 135) | def ranking_metric( FILE: src/ragas/metrics/result.py class MetricResult (line 11) | class MetricResult: method __init__ (line 23) | def __init__( method __repr__ (line 41) | def __repr__(self): method value (line 50) | def value(self): method __getitem__ (line 55) | def __getitem__(self, key): method __iter__ (line 60) | def __iter__(self): method __len__ (line 65) | def __len__(self): method __float__ (line 71) | def __float__(self): method __int__ (line 76) | def __int__(self): method __add__ (line 81) | def __add__(self, other): method __radd__ (line 88) | def __radd__(self, other): method __sub__ (line 93) | def __sub__(self, other): method __rsub__ (line 100) | def __rsub__(self, other): method __mul__ (line 105) | def __mul__(self, other): method __rmul__ (line 112) | def __rmul__(self, other): method __truediv__ (line 117) | def __truediv__(self, other): method __rtruediv__ (line 124) | def __rtruediv__(self, other): method __eq__ (line 130) | def __eq__(self, other): method __lt__ (line 135) | def __lt__(self, other): method __le__ (line 140) | def __le__(self, other): method __gt__ (line 145) | def __gt__(self, other): method __ge__ (line 150) | def __ge__(self, other): method __getattr__ (line 156) | def __getattr__(self, name): method to_dict (line 178) | def to_dict(self): method validate (line 183) | def validate(cls, value: t.Any, info: ValidationInfo): method __json__ (line 189) | def __json__(self): method __get_pydantic_core_schema__ (line 201) | def __get_pydantic_core_schema__( FILE: src/ragas/metrics/utils.py function fbeta_score (line 1) | def fbeta_score(tp, fp, fn, beta=1.0): FILE: src/ragas/metrics/validators.py class BaseValidator (line 19) | class BaseValidator(ABC): method validate_result_value (line 25) | def validate_result_value(self, result_value: t.Any) -> t.Optional[str]: class DiscreteValidator (line 38) | class DiscreteValidator(BaseValidator): method validate_result_value (line 43) | def validate_result_value(self, result_value: t.Any) -> t.Optional[str]: class NumericValidator (line 53) | class NumericValidator(BaseValidator): method validate_result_value (line 58) | def validate_result_value(self, result_value: t.Any) -> t.Optional[str]: class RankingValidator (line 76) | class RankingValidator(BaseValidator): method validate_result_value (line 81) | def validate_result_value(self, result_value: t.Any) -> t.Optional[str]: function get_validator_for_allowed_values (line 93) | def get_validator_for_allowed_values( function get_metric_type_name (line 116) | def get_metric_type_name(allowed_values: AllowedValuesType) -> str: FILE: src/ragas/optimizers/base.py class Optimizer (line 15) | class Optimizer(ABC): method optimize (line 24) | def optimize( FILE: src/ragas/optimizers/dspy_adapter.py function setup_dspy_llm (line 9) | def setup_dspy_llm(dspy: t.Any, ragas_llm: BaseRagasLLM) -> None: function pydantic_prompt_to_dspy_signature (line 26) | def pydantic_prompt_to_dspy_signature( function ragas_dataset_to_dspy_examples (line 71) | def ragas_dataset_to_dspy_examples( function create_dspy_metric (line 129) | def create_dspy_metric( FILE: src/ragas/optimizers/dspy_llm_wrapper.py class RagasDSPyLM (line 6) | class RagasDSPyLM: method __init__ (line 19) | def __init__(self, ragas_llm: BaseRagasLLM): method __call__ (line 23) | def __call__( method _generate (line 56) | async def _generate( method inspect_history (line 89) | def inspect_history(self, n: int = 1) -> t.List[t.Dict[str, t.Any]]: FILE: src/ragas/optimizers/dspy_optimizer.py class DSPyOptimizer (line 19) | class DSPyOptimizer(Optimizer): method __post_init__ (line 76) | def __post_init__(self): method _validate_parameters (line 89) | def _validate_parameters(self): method optimize (line 117) | def optimize( method _extract_instruction (line 239) | def _extract_instruction(self, optimized_module: t.Any) -> str: method _generate_cache_key (line 265) | def _generate_cache_key( FILE: src/ragas/optimizers/genetic.py class FormattedExamples (line 35) | class FormattedExamples(BaseModel): method from_examples (line 39) | def from_examples(cls, examples: t.List[example_type]) -> "FormattedEx... class OutputInstruction (line 49) | class OutputInstruction(BaseModel): class ReverseEngineerPrompt (line 53) | class ReverseEngineerPrompt(PydanticPrompt[FormattedExamples, OutputInst... class ParentPrompts (line 60) | class ParentPrompts(BaseModel): class CrossOverPrompt (line 65) | class CrossOverPrompt(PydanticPrompt[ParentPrompts, OutputInstruction]): class FeedbackExample (line 88) | class FeedbackExample(BaseModel): class FeedbackMutationInput (line 94) | class FeedbackMutationInput(BaseModel): class FeedbackMutationOutput (line 99) | class FeedbackMutationOutput(BaseModel): class FeedbackMutationPrompt (line 103) | class FeedbackMutationPrompt( class FeedbackMutationPromptInput (line 115) | class FeedbackMutationPromptInput(BaseModel): class FeedbackMutationPromptGeneration (line 120) | class FeedbackMutationPromptGeneration( class GeneticOptimizer (line 129) | class GeneticOptimizer(Optimizer): method optimize (line 139) | def optimize( method initialize_population (line 253) | def initialize_population( method _reverse_engineer_instruction (line 307) | async def _reverse_engineer_instruction( method _cross_over_prompts (line 342) | async def _cross_over_prompts( method _set_instructions (line 354) | def _set_instructions(self, candidates: t.Dict[str, str]): method feedback_mutation (line 362) | def feedback_mutation( method _feedback_mutation (line 419) | async def _feedback_mutation( method _implement_feedbacks (line 462) | async def _implement_feedbacks( method _get_feedbacks (line 490) | async def _get_feedbacks( method _get_evaluation_dataset (line 543) | def _get_evaluation_dataset( method evaluate_candidate (line 566) | def evaluate_candidate( method evaluate_fitness (line 597) | def evaluate_fitness( method _cross_over_chain (line 644) | async def _cross_over_chain( method cross_over_mutation (line 662) | def cross_over_mutation( FILE: src/ragas/optimizers/utils.py function hamming_distance (line 4) | def hamming_distance(vectors: np.ndarray) -> np.ndarray: FILE: src/ragas/prompt/base.py class BasePrompt (line 23) | class BasePrompt(ABC): method __init__ (line 24) | def __init__( method __repr__ (line 36) | def __repr__(self): method generate (line 40) | async def generate( method generate_multiple (line 54) | def generate_multiple( method save (line 68) | def save(self, file_path: str): method load (line 84) | def load(cls, file_path: str) -> "BasePrompt": class StringIO (line 108) | class StringIO(BaseModel): method __hash__ (line 111) | def __hash__(self): class BoolIO (line 115) | class BoolIO(BaseModel): method __hash__ (line 118) | def __hash__(self): class StringPrompt (line 122) | class StringPrompt(BasePrompt): method generate (line 140) | async def generate( method generate_multiple (line 180) | async def generate_multiple( FILE: src/ragas/prompt/dynamic_few_shot.py class SimpleExampleStore (line 22) | class SimpleExampleStore(ABC): method get_examples (line 24) | def get_examples( method add_example (line 31) | def add_example(self, input: t.Dict, output: t.Dict) -> None: class SimpleInMemoryExampleStore (line 36) | class SimpleInMemoryExampleStore(SimpleExampleStore): method __init__ (line 37) | def __init__(self, embedding_model=None): method _get_embedding (line 48) | def _get_embedding(self, data: t.Dict) -> t.List[float]: method add_example (line 57) | def add_example(self, input: t.Dict, output: t.Dict) -> None: method get_examples (line 70) | def get_examples( method _get_nearest_examples (line 92) | def _get_nearest_examples( method __len__ (line 123) | def __len__(self): class DynamicFewShotPrompt (line 127) | class DynamicFewShotPrompt(Prompt): method __init__ (line 128) | def __init__( method format (line 169) | def format(self, **kwargs) -> str: method add_example (line 197) | def add_example(self, input: t.Dict, output: t.Dict) -> None: method from_prompt (line 218) | def from_prompt( method __str__ (line 253) | def __str__(self) -> str: method save (line 265) | def save(self, path: str, include_embeddings: bool = True) -> None: method _serialize_embedding_model_info (line 326) | def _serialize_embedding_model_info(self) -> t.Optional[t.Dict]: method load (line 338) | def load( FILE: src/ragas/prompt/few_shot_pydantic_prompt.py class ExampleStore (line 25) | class ExampleStore(ABC): method get_examples (line 27) | def get_examples( method add_example (line 33) | def add_example(self, input: BaseModel, output: BaseModel): class InMemoryExampleStore (line 38) | class InMemoryExampleStore(ExampleStore): method add_example (line 47) | def add_example(self, input: BaseModel, output: BaseModel): method get_examples (line 53) | def get_examples( method get_nearest_examples (line 65) | def get_nearest_examples( method __repr__ (line 93) | def __repr__(self): class FewShotPydanticPrompt (line 98) | class FewShotPydanticPrompt(PydanticPrompt, t.Generic[InputModel, Output... method __post_init__ (line 103) | def __post_init__(self): method add_example (line 106) | def add_example(self, input: InputModel, output: OutputModel): method generate_multiple (line 109) | async def generate_multiple( method from_pydantic_prompt (line 138) | def from_pydantic_prompt( FILE: src/ragas/prompt/metrics/answer_accuracy.py function answer_accuracy_judge1_prompt (line 6) | def answer_accuracy_judge1_prompt( function answer_accuracy_judge2_prompt (line 39) | def answer_accuracy_judge2_prompt( FILE: src/ragas/prompt/metrics/answer_correctness.py function correctness_classifier_prompt (line 10) | def correctness_classifier_prompt( FILE: src/ragas/prompt/metrics/answer_relevance.py function answer_relevancy_prompt (line 6) | def answer_relevancy_prompt(response: str) -> str: FILE: src/ragas/prompt/metrics/base_prompt.py class _TranslatedStrings (line 33) | class _TranslatedStrings(BaseModel): function _translate_strings (line 41) | async def _translate_strings( class BasePrompt (line 78) | class BasePrompt(ABC, t.Generic[InputModel, OutputModel]): method to_string (line 97) | def to_string(self, data: InputModel) -> str: method _generate_examples (line 128) | def _generate_examples(self) -> str: method adapt (line 148) | async def adapt( FILE: src/ragas/prompt/metrics/common.py function statement_generator_prompt (line 7) | def statement_generator_prompt(question: str, answer: str) -> str: function nli_statement_prompt (line 50) | def nli_statement_prompt(context: str, statements: t.List[str]) -> str: FILE: src/ragas/prompt/metrics/context_entity_recall.py function extract_entities_prompt (line 6) | def extract_entities_prompt(text: str) -> str: FILE: src/ragas/prompt/metrics/context_recall.py function context_recall_prompt (line 6) | def context_recall_prompt(question: str, context: str, answer: str) -> str: FILE: src/ragas/prompt/metrics/context_relevance.py function context_relevance_judge1_prompt (line 6) | def context_relevance_judge1_prompt(query: str, context: str) -> str: function context_relevance_judge2_prompt (line 42) | def context_relevance_judge2_prompt(query: str, context: str) -> str: FILE: src/ragas/prompt/metrics/factual_correctness.py function claim_decomposition_prompt (line 6) | def claim_decomposition_prompt( FILE: src/ragas/prompt/metrics/noise_sensitivity.py function nli_statement_prompt (line 7) | def nli_statement_prompt(context: str, statements: t.List[str]) -> str: FILE: src/ragas/prompt/metrics/response_groundedness.py function response_groundedness_judge1_prompt (line 4) | def response_groundedness_judge1_prompt(response: str, context: str) -> ... function response_groundedness_judge2_prompt (line 36) | def response_groundedness_judge2_prompt(response: str, context: str) -> ... FILE: src/ragas/prompt/metrics/summary_score.py function extract_keyphrases_prompt (line 7) | def extract_keyphrases_prompt(text: str) -> str: function generate_questions_prompt (line 48) | def generate_questions_prompt(text: str, keyphrases: t.List[str]) -> str: function generate_answers_prompt (line 100) | def generate_answers_prompt(summary: str, questions: t.List[str]) -> str: FILE: src/ragas/prompt/mixin.py class PromptMixin (line 17) | class PromptMixin: method _get_prompts (line 25) | def _get_prompts(self) -> t.Dict[str, PydanticPrompt]: method get_prompts (line 32) | def get_prompts(self) -> t.Dict[str, PydanticPrompt]: method set_prompts (line 41) | def set_prompts(self, **prompts): method adapt_prompts (line 63) | async def adapt_prompts( method save_prompts (line 86) | def save_prompts(self, path: str): method load_prompts (line 105) | def load_prompts(self, path: str, language: t.Optional[str] = None): FILE: src/ragas/prompt/multi_modal_prompt.py class TextContent (line 41) | class TextContent(TypedDict): class ImageUrlContent (line 46) | class ImageUrlContent(TypedDict): class ImageTextPrompt (line 89) | class ImageTextPrompt(PydanticPrompt, t.Generic[InputModel, OutputModel]): method _generate_examples (line 90) | def _generate_examples(self): method to_prompt_value (line 113) | def to_prompt_value(self, data: t.Optional[InputModel] = None): method generate_multiple (line 122) | async def generate_multiple( class ImageTextPromptValue (line 221) | class ImageTextPromptValue(PromptValue): method __len__ (line 224) | def __len__(self): method to_messages (line 228) | def to_messages(self) -> t.List[BaseMessage]: method _securely_process_item (line 248) | def _securely_process_item(self, item: str) -> t.Optional[MessageConte... method _looks_like_image_path (line 288) | def _looks_like_image_path(self, item: str) -> bool: method _get_text_payload (line 302) | def _get_text_payload(self, text: str) -> TextContent: method _get_image_payload (line 306) | def _get_image_payload(self, mime_type: str, encoded_image: str) -> Im... method _try_process_base64_uri (line 323) | def _try_process_base64_uri(self, item: str) -> t.Optional[dict]: method _try_process_allowed_url (line 350) | def _try_process_allowed_url(self, item: str) -> t.Optional[dict]: method _download_validate_and_encode (line 366) | def _download_validate_and_encode(self, url: str) -> t.Optional[dict]: method _is_safe_url_target (line 463) | def _is_safe_url_target(self, url_hostname: str) -> bool: method _try_process_local_file (line 540) | def _try_process_local_file(self, item: str) -> t.Optional[dict]: method to_string (line 630) | def to_string(self): FILE: src/ragas/prompt/pydantic_prompt.py function is_langchain_llm (line 30) | def is_langchain_llm( class PydanticPrompt (line 82) | class PydanticPrompt(BasePrompt, t.Generic[InputModel, OutputModel]): method _generate_instruction (line 89) | def _generate_instruction(self) -> str: method _generate_output_signature (line 92) | def _generate_output_signature(self, indent: int = 4) -> str: method _generate_examples (line 101) | def _generate_examples(self): method to_string (line 120) | def to_string(self, data: t.Optional[InputModel] = None) -> str: method generate (line 136) | async def generate( method generate_multiple (line 188) | async def generate_multiple( method process_input (line 351) | def process_input(self, input: InputModel) -> InputModel: method process_output (line 354) | def process_output(self, output: OutputModel, input: InputModel) -> Ou... method adapt (line 357) | async def adapt( method __repr__ (line 396) | def __repr__(self): method __str__ (line 399) | def __str__(self): method __hash__ (line 414) | def __hash__(self): method __eq__ (line 439) | def __eq__(self, other): method save (line 451) | def save(self, file_path: str): method load (line 474) | def load(cls, file_path: str) -> "PydanticPrompt[InputModel, OutputMod... class OutputStringAndPrompt (line 511) | class OutputStringAndPrompt(BaseModel): class FixOutputFormat (line 516) | class FixOutputFormat(PydanticPrompt[OutputStringAndPrompt, StringIO]): class RagasOutputParser (line 525) | class RagasOutputParser(PydanticOutputParser[OutputModel]): method parse_output_string (line 526) | async def parse_output_string( class ToTranslate (line 562) | class ToTranslate(BaseModel): class Translated (line 567) | class Translated(BaseModel): class TranslateStatements (line 571) | class TranslateStatements(PydanticPrompt[ToTranslate, Translated]): method process_output (line 619) | def process_output(self, output: Translated, input: ToTranslate) -> Tr... FILE: src/ragas/prompt/simple_prompt.py class Prompt (line 17) | class Prompt: method __init__ (line 18) | def __init__( method format (line 98) | def format(self, **kwargs) -> str: method _format_examples (line 122) | def _format_examples(self) -> str: method add_example (line 137) | def add_example(self, input: t.Dict, output: t.Dict) -> None: method save (line 160) | def save(self, path: str) -> None: method load (line 201) | def load( method _serialize_response_model_info (line 268) | def _serialize_response_model_info(self) -> t.Optional[t.Dict]: method _validate_response_model (line 280) | def _validate_response_model( method __str__ (line 299) | def __str__(self) -> str: FILE: src/ragas/prompt/utils.py function get_all_strings (line 7) | def get_all_strings(obj: t.Any) -> list[str]: function update_strings (line 28) | def update_strings(obj: t.Any, old_strings: list[str], new_strings: list... function extract_json (line 69) | def extract_json(text: str) -> str: FILE: src/ragas/run_config.py class RunConfig (line 19) | class RunConfig: method __post_init__ (line 62) | def __post_init__(self): function add_retry (line 66) | def add_retry(fn: WrappedFn, run_config: RunConfig) -> WrappedFn: function add_async_retry (line 97) | def add_async_retry(fn: WrappedFn, run_config: RunConfig) -> WrappedFn: FILE: src/ragas/testset/graph.py class UUIDEncoder (line 16) | class UUIDEncoder(json.JSONEncoder): method default (line 17) | def default(self, o): class NodeType (line 23) | class NodeType(str, Enum): class Node (line 35) | class Node(BaseModel): method __repr__ (line 54) | def __repr__(self) -> str: method __str__ (line 57) | def __str__(self) -> str: method add_property (line 60) | def add_property(self, key: str, value: t.Any): method get_property (line 73) | def get_property(self, key: str) -> t.Optional[t.Any]: method __hash__ (line 83) | def __hash__(self) -> int: method __eq__ (line 86) | def __eq__(self, other: object) -> bool: class Relationship (line 92) | class Relationship(BaseModel): method get_property (line 120) | def get_property(self, key: str) -> t.Optional[t.Any]: method __repr__ (line 126) | def __repr__(self) -> str: method __str__ (line 129) | def __str__(self) -> str: method __hash__ (line 132) | def __hash__(self) -> int: method __eq__ (line 135) | def __eq__(self, other: object) -> bool: method serialize_node (line 141) | def serialize_node(self, node: Node): class KnowledgeGraph (line 146) | class KnowledgeGraph: method add (line 161) | def add(self, item: t.Union[Node, Relationship]): method _add_node (line 177) | def _add_node(self, node: Node): method _add_relationship (line 180) | def _add_relationship(self, relationship: Relationship): method save (line 183) | def save(self, path: t.Union[str, Path]): method load (line 207) | def load(cls, path: t.Union[str, Path]) -> "KnowledgeGraph": method __repr__ (line 251) | def __repr__(self) -> str: method __str__ (line 254) | def __str__(self) -> str: method get_node_by_id (line 257) | def get_node_by_id(self, node_id: t.Union[uuid.UUID, str]) -> t.Option... method find_indirect_clusters (line 276) | def find_indirect_clusters( method find_n_indirect_clusters (line 471) | def find_n_indirect_clusters( method remove_node (line 647) | def remove_node( method find_two_nodes_single_rel (line 694) | def find_two_nodes_single_rel( FILE: src/ragas/testset/graph_queries.py function get_child_nodes (line 6) | def get_child_nodes(node: Node, graph: KnowledgeGraph, level: int = 1) -... function get_parent_nodes (line 41) | def get_parent_nodes(node: Node, graph: KnowledgeGraph, level: int = 1) ... FILE: src/ragas/testset/persona.py function default_filter (line 16) | def default_filter(node: Node) -> bool: class Persona (line 25) | class Persona(BaseModel): class PersonaGenerationPrompt (line 30) | class PersonaGenerationPrompt(PydanticPrompt[StringIO, Persona]): class PersonaList (line 51) | class PersonaList(BaseModel): method __getitem__ (line 54) | def __getitem__(self, key: str) -> Persona: function generate_personas_from_kg (line 61) | def generate_personas_from_kg( FILE: src/ragas/testset/synthesizers/__init__.py function default_query_distribution (line 24) | def default_query_distribution( FILE: src/ragas/testset/synthesizers/base.py function _default_llm_factory (line 23) | def _default_llm_factory() -> t.Union[BaseRagasLLM, "InstructorBaseRagas... class QueryLength (line 34) | class QueryLength(str, Enum): class QueryStyle (line 44) | class QueryStyle(str, Enum): class BaseScenario (line 55) | class BaseScenario(BaseModel): class BaseSynthesizer (line 81) | class BaseSynthesizer(ABC, t.Generic[Scenario], PromptMixin): method __post_init__ (line 92) | def __post_init__(self): method generate_scenarios (line 96) | async def generate_scenarios( method _generate_scenarios (line 116) | async def _generate_scenarios( method generate_sample (line 125) | async def generate_sample( method _generate_sample (line 142) | async def _generate_sample( FILE: src/ragas/testset/synthesizers/generate.py class TestsetGenerator (line 55) | class TestsetGenerator: method from_langchain (line 77) | def from_langchain( method from_llama_index (line 96) | def from_llama_index( method generate_with_langchain_docs (line 114) | def generate_with_langchain_docs( method generate_with_llamaindex_docs (line 222) | def generate_with_llamaindex_docs( method generate_with_chunks (line 302) | def generate_with_chunks( method generate (line 414) | def generate( FILE: src/ragas/testset/synthesizers/multi_hop/abstract.py class MultiHopAbstractQuerySynthesizer (line 32) | class MultiHopAbstractQuerySynthesizer(MultiHopQuerySynthesizer): method get_node_clusters (line 41) | def get_node_clusters( method _generate_scenarios (line 58) | async def _generate_scenarios( FILE: src/ragas/testset/synthesizers/multi_hop/base.py class MultiHopScenario (line 30) | class MultiHopScenario(BaseScenario): method __repr__ (line 46) | def __repr__(self) -> str: class MultiHopQuerySynthesizer (line 51) | class MultiHopQuerySynthesizer(BaseSynthesizer[Scenario]): method prepare_combinations (line 54) | def prepare_combinations( method sample_diverse_combinations (line 92) | def sample_diverse_combinations( method convert_to_scenario (line 147) | def convert_to_scenario(self, data: t.Dict[str, t.Any]) -> MultiHopSce... method _generate_sample (line 156) | async def _generate_sample( method make_contexts (line 182) | def make_contexts(self, scenario: MultiHopScenario) -> t.List[str]: FILE: src/ragas/testset/synthesizers/multi_hop/prompts.py class ConceptsList (line 9) | class ConceptsList(BaseModel): class ConceptCombinations (line 18) | class ConceptCombinations(BaseModel): class ConceptCombinationPrompt (line 22) | class ConceptCombinationPrompt(PydanticPrompt[ConceptsList, ConceptCombi... class QueryConditions (line 58) | class QueryConditions(BaseModel): class GeneratedQueryAnswer (line 67) | class GeneratedQueryAnswer(BaseModel): class QueryAnswerGenerationPrompt (line 72) | class QueryAnswerGenerationPrompt( FILE: src/ragas/testset/synthesizers/multi_hop/specific.py class MultiHopSpecificQuerySynthesizer (line 30) | class MultiHopSpecificQuerySynthesizer(MultiHopQuerySynthesizer): method get_node_clusters (line 40) | def get_node_clusters(self, knowledge_graph: KnowledgeGraph) -> t.List... method _generate_scenarios (line 48) | async def _generate_scenarios( method _extract_themes_from_overlaps (line 118) | def _extract_themes_from_overlaps(self, overlapped_items: t.Any) -> t.... method _extract_theme_groups_from_overlaps (line 146) | def _extract_theme_groups_from_overlaps( FILE: src/ragas/testset/synthesizers/prompts.py class ThemesPersonasInput (line 9) | class ThemesPersonasInput(BaseModel): class PersonaThemesMapping (line 14) | class PersonaThemesMapping(BaseModel): class ThemesPersonasMatchingPrompt (line 18) | class ThemesPersonasMatchingPrompt( FILE: src/ragas/testset/synthesizers/single_hop/base.py class SingleHopScenario (line 30) | class SingleHopScenario(BaseScenario): method __repr__ (line 42) | def __repr__(self) -> str: class SingleHopQuerySynthesizer (line 47) | class SingleHopQuerySynthesizer(BaseSynthesizer[Scenario]): method prepare_combinations (line 50) | def prepare_combinations( method sample_combinations (line 71) | def sample_combinations(self, data: t.List[t.Dict[str, t.Any]], num_sa... method convert_to_scenario (line 108) | def convert_to_scenario(self, data: t.Dict[str, t.Any]) -> SingleHopSc... method _generate_sample (line 117) | async def _generate_sample( FILE: src/ragas/testset/synthesizers/single_hop/prompts.py class QueryCondition (line 9) | class QueryCondition(BaseModel): class GeneratedQueryAnswer (line 18) | class GeneratedQueryAnswer(BaseModel): class QueryAnswerGenerationPrompt (line 23) | class QueryAnswerGenerationPrompt(PydanticPrompt[QueryCondition, Generat... FILE: src/ragas/testset/synthesizers/single_hop/specific.py class SingleHopScenario (line 27) | class SingleHopScenario(BaseScenario): class SingleHopSpecificQuerySynthesizer (line 41) | class SingleHopSpecificQuerySynthesizer(SingleHopQuerySynthesizer): method _extract_themes_from_items (line 46) | def _extract_themes_from_items(self, items: t.Any) -> t.List[str]: method get_node_clusters (line 84) | def get_node_clusters(self, knowledge_graph: KnowledgeGraph) -> t.List... method _generate_scenarios (line 113) | async def _generate_scenarios( FILE: src/ragas/testset/synthesizers/testset_schema.py class TestsetSample (line 20) | class TestsetSample(BaseSample): class TestsetPacket (line 36) | class TestsetPacket(BaseModel): class Testset (line 47) | class Testset(RagasDataset[TestsetSample]): method to_evaluation_dataset (line 61) | def to_evaluation_dataset(self) -> EvaluationDataset: method to_list (line 69) | def to_list(self) -> t.List[t.Dict]: method from_list (line 81) | def from_list(cls, data: t.List[t.Dict]) -> Testset: method total_tokens (line 110) | def total_tokens(self) -> t.Union[t.List[TokenUsage], TokenUsage]: method total_cost (line 120) | def total_cost( method from_annotated (line 138) | def from_annotated(cls, path: str) -> Testset: FILE: src/ragas/testset/synthesizers/utils.py function calculate_split_values (line 5) | def calculate_split_values( FILE: src/ragas/testset/transforms/base.py function default_filter (line 17) | def default_filter(node: Node) -> bool: function _default_llm_factory (line 21) | def _default_llm_factory() -> t.Union[BaseRagasLLM, "InstructorBaseRagas... class BaseGraphTransformation (line 33) | class BaseGraphTransformation(ABC): method __post_init__ (line 44) | def __post_init__(self): method transform (line 49) | async def transform(self, kg: KnowledgeGraph) -> t.Any: method filter (line 67) | def filter(self, kg: KnowledgeGraph) -> KnowledgeGraph: method generate_execution_plan (line 102) | def generate_execution_plan(self, kg: KnowledgeGraph) -> t.Sequence[t.... class Extractor (line 121) | class Extractor(BaseGraphTransformation): method transform (line 135) | async def transform( method extract (line 166) | async def extract(self, node: Node) -> t.Tuple[str, t.Any]: method generate_execution_plan (line 182) | def generate_execution_plan(self, kg: KnowledgeGraph) -> t.Sequence[t.... class LLMBasedExtractor (line 219) | class LLMBasedExtractor(Extractor, PromptMixin): method split_text_by_token_limit (line 227) | def split_text_by_token_limit(self, text, max_token_limit): class Splitter (line 236) | class Splitter(BaseGraphTransformation): method transform (line 250) | async def transform( method split (line 278) | async def split(self, node: Node) -> t.Tuple[t.List[Node], t.List[Rela... method generate_execution_plan (line 294) | def generate_execution_plan(self, kg: KnowledgeGraph) -> t.Sequence[t.... class RelationshipBuilder (line 324) | class RelationshipBuilder(BaseGraphTransformation): method transform (line 335) | async def transform(self, kg: KnowledgeGraph) -> t.List[Relationship]: method generate_execution_plan (line 351) | def generate_execution_plan(self, kg: KnowledgeGraph) -> t.Sequence[t.... class NodeFilter (line 383) | class NodeFilter(BaseGraphTransformation): method transform (line 384) | async def transform(self, kg: KnowledgeGraph) -> KnowledgeGraph: method custom_filter (line 398) | async def custom_filter(self, node: Node, kg: KnowledgeGraph) -> bool: method generate_execution_plan (line 414) | def generate_execution_plan(self, kg: KnowledgeGraph) -> t.Sequence[t.... class LLMBasedNodeFilter (line 434) | class LLMBasedNodeFilter(NodeFilter, PromptMixin): FILE: src/ragas/testset/transforms/default.py function default_transforms (line 34) | def default_transforms( function default_transforms_for_prechunked (line 170) | def default_transforms_for_prechunked( FILE: src/ragas/testset/transforms/engine.py class Parallel (line 23) | class Parallel: method __init__ (line 32) | def __init__(self, *transformations: t.Union[BaseGraphTransformation, ... method generate_execution_plan (line 35) | def generate_execution_plan(self, kg: KnowledgeGraph) -> t.Sequence[t.... function get_desc (line 46) | def get_desc(transform: BaseGraphTransformation | Parallel): function apply_transforms (line 54) | def apply_transforms( function rollback_transforms (line 104) | def rollback_transforms(kg: KnowledgeGraph, transforms: Transforms): FILE: src/ragas/testset/transforms/extractors/embeddings.py class EmbeddingExtractor (line 12) | class EmbeddingExtractor(Extractor): method extract (line 32) | async def extract(self, node: Node) -> t.Tuple[str, t.Any]: FILE: src/ragas/testset/transforms/extractors/llm_based.py class TextWithExtractionLimit (line 11) | class TextWithExtractionLimit(BaseModel): class SummaryExtractorPrompt (line 16) | class SummaryExtractorPrompt(PydanticPrompt[StringIO, StringIO]): class Keyphrases (line 32) | class Keyphrases(BaseModel): class KeyphrasesExtractorPrompt (line 36) | class KeyphrasesExtractorPrompt(PydanticPrompt[TextWithExtractionLimit, ... class TitleExtractorPrompt (line 59) | class TitleExtractorPrompt(PydanticPrompt[StringIO, StringIO]): class Headlines (line 73) | class Headlines(BaseModel): class HeadlinesExtractorPrompt (line 77) | class HeadlinesExtractorPrompt(PydanticPrompt[TextWithExtractionLimit, H... class NEROutput (line 126) | class NEROutput(BaseModel): class NERPrompt (line 130) | class NERPrompt(PydanticPrompt[TextWithExtractionLimit, NEROutput]): class SummaryExtractor (line 160) | class SummaryExtractor(LLMBasedExtractor): method extract (line 175) | async def extract(self, node: Node) -> t.Tuple[str, t.Any]: class KeyphrasesExtractor (line 185) | class KeyphrasesExtractor(LLMBasedExtractor): method extract (line 201) | async def extract(self, node: Node) -> t.Tuple[str, t.Any]: class TitleExtractor (line 216) | class TitleExtractor(LLMBasedExtractor): method extract (line 231) | async def extract(self, node: Node) -> t.Tuple[str, t.Any]: class HeadlinesExtractor (line 241) | class HeadlinesExtractor(LLMBasedExtractor): method extract (line 257) | async def extract(self, node: Node) -> t.Tuple[str, t.Any]: class NERExtractor (line 273) | class NERExtractor(LLMBasedExtractor): method extract (line 289) | async def extract(self, node: Node) -> t.Tuple[str, t.List[str]]: class TopicDescription (line 304) | class TopicDescription(BaseModel): class TopicDescriptionPrompt (line 308) | class TopicDescriptionPrompt(PydanticPrompt[StringIO, TopicDescription]): class TopicDescriptionExtractor (line 325) | class TopicDescriptionExtractor(LLMBasedExtractor): method extract (line 340) | async def extract(self, node: Node) -> t.Tuple[str, t.Any]: class ThemesAndConcepts (line 349) | class ThemesAndConcepts(BaseModel): class ThemesAndConceptsExtractorPrompt (line 353) | class ThemesAndConceptsExtractorPrompt( class ThemesExtractor (line 380) | class ThemesExtractor(LLMBasedExtractor): method extract (line 396) | async def extract(self, node: Node) -> t.Tuple[str, t.List[str]]: FILE: src/ragas/testset/transforms/extractors/regex_based.py class RegexBasedExtractor (line 10) | class RegexBasedExtractor(Extractor): method extract (line 15) | async def extract(self, node: Node) -> t.Tuple[str, t.Any]: FILE: src/ragas/testset/transforms/filters.py class QuestionPotentialInput (line 24) | class QuestionPotentialInput(BaseModel): class QuestionPotentialOutput (line 36) | class QuestionPotentialOutput(BaseModel): class QuestionPotentialPrompt (line 43) | class QuestionPotentialPrompt( class CustomNodeFilter (line 55) | class CustomNodeFilter(LLMBasedNodeFilter): method custom_filter (line 64) | async def custom_filter(self, node: Node, kg: KnowledgeGraph) -> bool: FILE: src/ragas/testset/transforms/relationship_builders/cosine.py class CosineSimilarityBuilder (line 11) | class CosineSimilarityBuilder(RelationshipBuilder): method _block_cosine_similarity (line 17) | def _block_cosine_similarity(self, i: np.ndarray, j: np.ndarray): method _find_similar_embedding_pairs (line 23) | def _find_similar_embedding_pairs( method _validate_embedding_shapes (line 50) | def _validate_embedding_shapes(self, embeddings: t.List[t.Any]): method transform (line 61) | async def transform(self, kg: KnowledgeGraph) -> t.List[Relationship]: method generate_execution_plan (line 83) | def generate_execution_plan(self, kg: KnowledgeGraph) -> t.List[t.Coro... class SummaryCosineSimilarityBuilder (line 115) | class SummaryCosineSimilarityBuilder(CosineSimilarityBuilder): method _document_summary_filter (line 121) | def _document_summary_filter(self, kg: KnowledgeGraph) -> KnowledgeGraph: method transform (line 134) | async def transform(self, kg: KnowledgeGraph) -> t.List[Relationship]: FILE: src/ragas/testset/transforms/relationship_builders/traditional.py class JaccardSimilarityBuilder (line 12) | class JaccardSimilarityBuilder(RelationshipBuilder): method _jaccard_similarity (line 18) | def _jaccard_similarity(self, set1: t.Set[str], set2: t.Set[str]) -> f... method _find_similar_embedding_pairs (line 23) | def _find_similar_embedding_pairs( method transform (line 47) | async def transform(self, kg: KnowledgeGraph) -> t.List[Relationship]: method generate_execution_plan (line 60) | def generate_execution_plan(self, kg: KnowledgeGraph) -> t.List[t.Coro... class OverlapScoreBuilder (line 81) | class OverlapScoreBuilder(RelationshipBuilder): method __post_init__ (line 89) | def __post_init__(self): method _overlap_score (line 105) | def _overlap_score(self, overlaps: t.List[bool]) -> float: method _get_noisy_items (line 108) | def _get_noisy_items( method transform (line 129) | async def transform(self, kg: KnowledgeGraph) -> t.List[Relationship]: FILE: src/ragas/testset/transforms/splitters/headline.py class HeadlineSplitter (line 10) | class HeadlineSplitter(Splitter): method adjust_chunks (line 14) | def adjust_chunks(self, chunks): method split (line 58) | async def split(self, node: Node) -> t.Tuple[t.List[Node], t.List[Rela... FILE: src/ragas/tokenizers.py class BaseTokenizer (line 16) | class BaseTokenizer(ABC): method encode (line 20) | def encode(self, text: str) -> t.List[int]: method decode (line 25) | def decode(self, tokens: t.List[int]) -> str: method count_tokens (line 29) | def count_tokens(self, text: str) -> int: class TiktokenWrapper (line 34) | class TiktokenWrapper(BaseTokenizer): method __init__ (line 37) | def __init__( method encode (line 66) | def encode(self, text: str) -> t.List[int]: method decode (line 69) | def decode(self, tokens: t.List[int]) -> str: method encoding (line 73) | def encoding(self) -> tiktoken.Encoding: class HuggingFaceTokenizer (line 78) | class HuggingFaceTokenizer(BaseTokenizer): method __init__ (line 81) | def __init__( method encode (line 112) | def encode(self, text: str) -> t.List[int]: method decode (line 115) | def decode(self, tokens: t.List[int]) -> str: method tokenizer (line 119) | def tokenizer(self) -> t.Any: function get_default_tokenizer (line 128) | def get_default_tokenizer() -> TiktokenWrapper: class _LazyTokenizer (line 136) | class _LazyTokenizer(BaseTokenizer): method __getattr__ (line 143) | def __getattr__(self, name: str) -> t.Any: method encode (line 146) | def encode(self, text: str) -> t.List[int]: method decode (line 149) | def decode(self, tokens: t.List[int]) -> str: method count_tokens (line 152) | def count_tokens(self, text: str) -> int: function get_tokenizer (line 160) | def get_tokenizer( FILE: src/ragas/utils.py function get_cache_dir (line 30) | def get_cache_dir() -> str: function get_debug_mode (line 39) | def get_debug_mode() -> bool: function safe_nanmean (line 46) | def safe_nanmean(arr: t.List[float]) -> float: function check_if_sum_is_close (line 58) | def check_if_sum_is_close( function patch_logger (line 66) | def patch_logger(module: str, level: int): function is_nan (line 83) | def is_nan(x): function get_metric_language (line 90) | def get_metric_language(metric: "Metric") -> str: class DeprecationHelper (line 101) | class DeprecationHelper: method __init__ (line 104) | def __init__(self, new_target: t.Type, deprecation_message: str): method _warn (line 108) | def _warn(self): method __call__ (line 111) | def __call__(self, *args, **kwargs): method __getattr__ (line 115) | def __getattr__(self, attr): function deprecated (line 120) | def deprecated( function get_or_init (line 191) | def get_or_init( function get_from_dict (line 200) | def get_from_dict(data_dict: t.Dict, key: str, default=None) -> t.Any: function get_required_columns_v1 (line 221) | def get_required_columns_v1(metric: Metric): function convert_row_v1_to_v2 (line 227) | def convert_row_v1_to_v2(row: t.Dict[str, t.Any]) -> t.Dict[str, t.Any]: function convert_v1_to_v2_dataset (line 232) | def convert_v1_to_v2_dataset(dataset: Dataset) -> Dataset: function convert_v2_to_v1_dataset (line 237) | def convert_v2_to_v1_dataset(dataset: Dataset) -> Dataset: function camel_to_snake (line 242) | def camel_to_snake(name): function num_tokens_from_string (line 251) | def num_tokens_from_string( function batched (line 279) | def batched(iterable: t.Iterable, n: int) -> t.Iterator[t.Tuple]: class ProgressBarManager (line 289) | class ProgressBarManager: method __init__ (line 292) | def __init__(self, desc: str, show_progress: bool): method create_single_bar (line 296) | def create_single_bar(self, total: int) -> tqdm: method create_nested_bars (line 304) | def create_nested_bars(self, total_jobs: int, batch_size: int): method update_batch_bar (line 326) | def update_batch_bar( function set_logging_level (line 337) | def set_logging_level(logger_name: str = __name__, level: int = logging.... class _ContextualFormatter (line 366) | class _ContextualFormatter(logging.Formatter): method format (line 371) | def format(self, record): method format_time (line 384) | def format_time(self, record, datefmt=None, local_time=False): method utc_converter (line 395) | def utc_converter(timestamp): class MemorableNames (line 405) | class MemorableNames: method __init__ (line 408) | def __init__(self): method generate_name (line 586) | def generate_name(self): method generate_unique_name (line 592) | def generate_unique_name(self): method generate_unique_names (line 610) | def generate_unique_names(self, count): function find_git_root (line 619) | def find_git_root(start_path: t.Union[str, Path, None] = None) -> Path: function create_nano_id (line 644) | def create_nano_id(size: int = 12) -> str: function async_to_sync (line 662) | def async_to_sync(async_func): function get_test_directory (line 685) | def get_test_directory(): FILE: src/ragas/validation.py function remap_column_names (line 14) | def remap_column_names(dataset: Dataset, column_map: dict[str, str]) -> ... function get_supported_metric_type (line 23) | def get_supported_metric_type(ds: EvaluationDataset): function validate_required_columns (line 37) | def validate_required_columns(ds: EvaluationDataset, metrics: t.Sequence... function validate_supported_metrics (line 50) | def validate_supported_metrics(ds: EvaluationDataset, metrics: t.Sequenc... FILE: tests/benchmarks/benchmark_testsetgen.py function get_documents (line 12) | def get_documents(): FILE: tests/benchmarks/utils.py function timeit (line 16) | def timeit(func: OrigFunc, iteration: int = 3) -> DecoratedFunc: function print_table (line 40) | def print_table(result): FILE: tests/conftest.py function pytest_configure (line 17) | def pytest_configure(config): class EchoLLM (line 34) | class EchoLLM(BaseRagasLLM): method generate_text (line 35) | def generate_text( # type: ignore method agenerate_text (line 43) | async def agenerate_text( # type: ignore method is_finished (line 51) | def is_finished(self, response: LLMResult) -> bool: class EchoEmbedding (line 55) | class EchoEmbedding(BaseRagasEmbeddings): method aembed_documents (line 56) | async def aembed_documents(self, texts: t.List[str]) -> t.List[t.List[... method aembed_query (line 59) | async def aembed_query(self, text: str) -> t.List[float]: method embed_documents (line 62) | def embed_documents(self, texts: t.List[str]) -> t.List[t.List[float]]: method embed_query (line 65) | def embed_query(self, text: str) -> t.List[float]: function fake_llm (line 70) | def fake_llm(): function fake_embedding (line 75) | def fake_embedding(): class MockLLM (line 84) | class MockLLM: method __init__ (line 87) | def __init__(self): method generate (line 92) | def generate(self, prompt: str, response_model: t.Type[BaseModel]) -> ... method agenerate (line 96) | async def agenerate( class MockEmbedding (line 103) | class MockEmbedding(BaseRagasEmbeddings): method embed_text (line 106) | def embed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method aembed_text (line 110) | async def aembed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method embed_document (line 114) | def embed_document( method aembed_document (line 122) | async def aembed_document( function mock_llm (line 132) | def mock_llm(): function mock_embedding (line 137) | def mock_embedding(): FILE: tests/docs/test_run_config.py function test_openai_client_configuration (line 11) | def test_openai_client_configuration(): function test_fine_grained_timeout_control (line 40) | def test_fine_grained_timeout_control(): FILE: tests/e2e/metrics_migration/base_migration_test.py class BaseMigrationTest (line 17) | class BaseMigrationTest: method run_e2e_compatibility_test (line 25) | async def run_e2e_compatibility_test( method run_metric_specific_test (line 110) | async def run_metric_specific_test( method create_requirements_documentation (line 177) | def create_requirements_documentation( FILE: tests/e2e/metrics_migration/conftest.py function legacy_llm (line 18) | def legacy_llm(): function modern_llm (line 31) | def modern_llm(): function legacy_embeddings (line 44) | def legacy_embeddings(): function modern_embeddings (line 57) | def modern_embeddings(): FILE: tests/e2e/metrics_migration/test_answer_accuracy_migration.py function nvidia_legacy_llm (line 13) | def nvidia_legacy_llm(): function nvidia_modern_llm (line 28) | def nvidia_modern_llm(): class TestAnswerAccuracyE2EMigration (line 44) | class TestAnswerAccuracyE2EMigration: method sample_data (line 48) | def sample_data(self): method test_llm (line 78) | def test_llm(self): method test_modern_llm (line 90) | def test_modern_llm(self): method test_legacy_answer_accuracy_vs_v2_answer_accuracy_e2e_compatibility (line 109) | async def test_legacy_answer_accuracy_vs_v2_answer_accuracy_e2e_compat... method test_answer_accuracy_dual_judge_system (line 169) | async def test_answer_accuracy_dual_judge_system(self, test_modern_llm): method test_answer_accuracy_migration_requirements_documented (line 192) | def test_answer_accuracy_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_answer_correctness_migration.py class TestAnswerCorrectnessE2EMigration (line 11) | class TestAnswerCorrectnessE2EMigration: method sample_data (line 15) | def sample_data(self): method test_llm (line 51) | def test_llm(self): method test_modern_llm (line 66) | def test_modern_llm(self): method test_legacy_embeddings (line 81) | def test_legacy_embeddings(self): method test_modern_embeddings (line 95) | def test_modern_embeddings(self): method test_legacy_answer_correctness_vs_v2_answer_correctness_e2e_compatibility (line 117) | async def test_legacy_answer_correctness_vs_v2_answer_correctness_e2e_... method test_answer_correctness_factual_error_detection (line 190) | async def test_answer_correctness_factual_error_detection( method test_answer_correctness_weight_configuration (line 275) | async def test_answer_correctness_weight_configuration( method test_answer_correctness_parameter_validation (line 338) | def test_answer_correctness_parameter_validation(self): method test_answer_correctness_migration_requirements_documented (line 377) | def test_answer_correctness_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_answer_relevancy_migration.py class TestAnswerRelevancyE2EMigration (line 10) | class TestAnswerRelevancyE2EMigration: method sample_data (line 14) | def sample_data(self): method test_llm (line 45) | def test_llm(self): method test_modern_llm (line 58) | def test_modern_llm(self): method test_legacy_embeddings (line 73) | def test_legacy_embeddings(self): method test_modern_embeddings (line 88) | def test_modern_embeddings(self): method test_legacy_answer_relevancy_vs_v2_answer_relevancy_e2e_compatibility (line 113) | async def test_legacy_answer_relevancy_vs_v2_answer_relevancy_e2e_comp... method test_answer_relevancy_noncommittal_detection (line 178) | async def test_answer_relevancy_noncommittal_detection( method test_answer_relevancy_migration_requirements_documented (line 260) | def test_answer_relevancy_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_bleu_migration.py class TestBleuE2EMigration (line 10) | class TestBleuE2EMigration: method sample_data (line 14) | def sample_data(self): method test_legacy_vs_v2_class_e2e_compatibility (line 50) | async def test_legacy_vs_v2_class_e2e_compatibility(self, sample_data): method test_bleu_score_performance_comparison (line 89) | async def test_bleu_score_performance_comparison(self, sample_data): method test_v2_class_no_components_needed (line 124) | async def test_v2_class_no_components_needed(self): method test_v2_class_batch_processing (line 152) | async def test_v2_class_batch_processing(self, sample_data): method test_bleu_with_custom_kwargs (line 177) | async def test_bleu_with_custom_kwargs(self): FILE: tests/e2e/metrics_migration/test_context_entity_recall_migration.py class TestContextEntityRecallE2EMigration (line 11) | class TestContextEntityRecallE2EMigration: method sample_data (line 15) | def sample_data(self): method test_llm (line 62) | def test_llm(self): method test_modern_llm (line 74) | def test_modern_llm(self): method test_legacy_context_entity_recall_vs_v2_context_entity_recall_e2e_compatibility (line 89) | async def test_legacy_context_entity_recall_vs_v2_context_entity_recal... method test_context_entity_recall_entity_extraction_accuracy (line 144) | async def test_context_entity_recall_entity_extraction_accuracy( method test_context_entity_recall_parameter_validation (line 214) | def test_context_entity_recall_parameter_validation(self): method test_context_entity_recall_migration_requirements_documented (line 230) | def test_context_entity_recall_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_context_precision_migration.py class TestContextPrecisionE2EMigration (line 18) | class TestContextPrecisionE2EMigration: method sample_data (line 22) | def sample_data(self): method test_llm (line 60) | def test_llm(self): method test_modern_llm (line 75) | def test_modern_llm(self): method test_legacy_vs_v2_context_precision_with_reference_e2e_compatibility (line 90) | async def test_legacy_vs_v2_context_precision_with_reference_e2e_compa... method test_legacy_vs_v2_context_precision_without_reference_e2e_compatibility (line 140) | async def test_legacy_vs_v2_context_precision_without_reference_e2e_co... method test_context_precision_input_validation (line 190) | async def test_context_precision_input_validation(self, test_modern_llm): method test_context_precision_migration_requirements_documented (line 226) | def test_context_precision_migration_requirements_documented(self): method test_context_precision_edge_cases (line 237) | async def test_context_precision_edge_cases(self, test_modern_llm): method test_context_precision_wrappers (line 262) | async def test_context_precision_wrappers(self, test_modern_llm): FILE: tests/e2e/metrics_migration/test_context_recall_migration.py class TestContextRecallE2EMigration (line 11) | class TestContextRecallE2EMigration(BaseMigrationTest): method sample_data (line 15) | def sample_data(self): method test_legacy_context_recall_vs_v2_context_recall_e2e_compatibility (line 63) | async def test_legacy_context_recall_vs_v2_context_recall_e2e_compatib... method test_context_recall_attribution_detection (line 82) | async def test_context_recall_attribution_detection(self, legacy_llm, ... method test_context_recall_migration_requirements_documented (line 143) | def test_context_recall_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_context_relevance_migration.py function nvidia_legacy_llm (line 13) | def nvidia_legacy_llm(): function nvidia_modern_llm (line 28) | def nvidia_modern_llm(): class TestContextRelevanceE2EMigration (line 44) | class TestContextRelevanceE2EMigration: method sample_data (line 48) | def sample_data(self): method test_llm (line 85) | def test_llm(self): method test_modern_llm (line 97) | def test_modern_llm(self): method test_legacy_context_relevance_vs_v2_context_relevance_e2e_compatibility (line 116) | async def test_legacy_context_relevance_vs_v2_context_relevance_e2e_co... method test_context_relevance_edge_cases (line 176) | async def test_context_relevance_edge_cases(self, test_modern_llm): method test_context_relevance_dual_judge_system (line 199) | async def test_context_relevance_dual_judge_system(self, test_modern_l... method test_context_relevance_migration_requirements_documented (line 221) | def test_context_relevance_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_factual_correctness_migration.py class TestFactualCorrectnessE2EMigration (line 13) | class TestFactualCorrectnessE2EMigration: method sample_data (line 17) | def sample_data(self): method test_llm (line 48) | def test_llm(self): method test_modern_llm (line 63) | def test_modern_llm(self): method test_legacy_factual_correctness_vs_v2_factual_correctness_e2e_compatibility (line 78) | async def test_legacy_factual_correctness_vs_v2_factual_correctness_e2... method test_factual_correctness_edge_cases (line 149) | async def test_factual_correctness_edge_cases(self, test_modern_llm): method test_factual_correctness_different_modes (line 172) | async def test_factual_correctness_different_modes(self, test_modern_l... method test_factual_correctness_atomicity_coverage_configurations (line 204) | async def test_factual_correctness_atomicity_coverage_configurations( method test_factual_correctness_migration_requirements_documented (line 237) | def test_factual_correctness_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_faithfulness_migration.py class TestFaithfulnessE2EMigration (line 11) | class TestFaithfulnessE2EMigration: method sample_data (line 15) | def sample_data(self): method test_llm (line 54) | def test_llm(self): method test_modern_llm (line 69) | def test_modern_llm(self): method test_legacy_faithfulness_vs_v2_faithfulness_e2e_compatibility (line 84) | async def test_legacy_faithfulness_vs_v2_faithfulness_e2e_compatibility( method test_faithfulness_edge_cases (line 137) | async def test_faithfulness_edge_cases(self, test_modern_llm): method test_faithfulness_high_vs_low_scores (line 170) | async def test_faithfulness_high_vs_low_scores(self, test_modern_llm): method test_faithfulness_migration_requirements_documented (line 202) | def test_faithfulness_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_noise_sensitivity_migration.py class TestNoiseSensitivityE2EMigration (line 10) | class TestNoiseSensitivityE2EMigration: method sample_data (line 14) | def sample_data(self): method test_llm (line 43) | def test_llm(self): method test_modern_llm (line 58) | def test_modern_llm(self): method test_legacy_noise_sensitivity_vs_v2_noise_sensitivity_e2e_compatibility (line 73) | async def test_legacy_noise_sensitivity_vs_v2_noise_sensitivity_e2e_co... method test_noise_sensitivity_mode_configuration (line 135) | async def test_noise_sensitivity_mode_configuration(self, test_modern_... method test_noise_sensitivity_parameter_validation (line 171) | async def test_noise_sensitivity_parameter_validation(self, test_moder... method test_noise_sensitivity_migration_requirements_documented (line 188) | def test_noise_sensitivity_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_response_groundedness_migration.py class TestResponseGroundednessE2EMigration (line 11) | class TestResponseGroundednessE2EMigration: method sample_data (line 15) | def sample_data(self): method test_llm (line 56) | def test_llm(self): method test_modern_llm (line 71) | def test_modern_llm(self): method test_legacy_response_groundedness_vs_v2_response_groundedness_e2e_compatibility (line 87) | async def test_legacy_response_groundedness_vs_v2_response_groundednes... method test_response_groundedness_edge_cases (line 139) | async def test_response_groundedness_edge_cases(self, test_modern_llm): method test_response_groundedness_scoring_behavior (line 162) | async def test_response_groundedness_scoring_behavior(self, test_moder... method test_response_groundedness_dual_judge_system (line 193) | async def test_response_groundedness_dual_judge_system(self, test_mode... method test_response_groundedness_migration_requirements_documented (line 215) | def test_response_groundedness_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_rouge_migration.py class TestRougeE2EMigration (line 16) | class TestRougeE2EMigration: method sample_data (line 20) | def sample_data(self): method test_legacy_vs_v2_class_e2e_compatibility (line 62) | async def test_legacy_vs_v2_class_e2e_compatibility( method test_rouge_score_performance_comparison (line 110) | async def test_rouge_score_performance_comparison(self, sample_data): method test_v2_class_no_components_needed (line 158) | async def test_v2_class_no_components_needed(self): method test_v2_class_batch_processing (line 186) | async def test_v2_class_batch_processing(self, sample_data): FILE: tests/e2e/metrics_migration/test_semantic_similarity_migration.py class TestSemanticSimilarityE2EMigration (line 13) | class TestSemanticSimilarityE2EMigration: method sample_data (line 17) | def sample_data(self): method test_legacy_embeddings (line 48) | def test_legacy_embeddings(self): method test_modern_embeddings (line 62) | def test_modern_embeddings(self): method test_legacy_semantic_similarity_vs_v2_semantic_similarity_e2e_compatibility (line 85) | async def test_legacy_semantic_similarity_vs_v2_semantic_similarity_e2... method test_semantic_similarity_with_threshold (line 140) | async def test_semantic_similarity_with_threshold( method test_v2_class_batch_processing (line 203) | async def test_v2_class_batch_processing(self, sample_data, test_moder... method test_semantic_similarity_migration_requirements_documented (line 230) | def test_semantic_similarity_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_string_migration.py class TestNonLLMStringSimilarityE2EMigration (line 21) | class TestNonLLMStringSimilarityE2EMigration: method sample_data (line 25) | def sample_data(self): method test_legacy_vs_v2_class_e2e_compatibility_levenshtein (line 76) | async def test_legacy_vs_v2_class_e2e_compatibility_levenshtein(self, ... method test_legacy_vs_v2_class_e2e_compatibility_jaro_winkler (line 121) | async def test_legacy_vs_v2_class_e2e_compatibility_jaro_winkler(self,... method test_all_distance_measures (line 166) | async def test_all_distance_measures(self): method test_performance_comparison (line 186) | async def test_performance_comparison(self, sample_data): method test_v2_class_no_components_needed (line 221) | async def test_v2_class_no_components_needed(self): method test_v2_class_batch_processing (line 249) | async def test_v2_class_batch_processing(self, sample_data): method test_edge_cases (line 274) | async def test_edge_cases(self): class TestExactMatchE2EMigration (line 297) | class TestExactMatchE2EMigration: method sample_data (line 301) | def sample_data(self): method test_legacy_vs_v2_class_e2e_compatibility (line 332) | async def test_legacy_vs_v2_class_e2e_compatibility(self, sample_data): class TestStringPresenceE2EMigration (line 371) | class TestStringPresenceE2EMigration: method sample_data (line 375) | def sample_data(self): method test_legacy_vs_v2_class_e2e_compatibility (line 416) | async def test_legacy_vs_v2_class_e2e_compatibility(self, sample_data): FILE: tests/e2e/metrics_migration/test_summary_score_migration.py class TestSummaryScoreE2EMigration (line 10) | class TestSummaryScoreE2EMigration: method sample_data (line 14) | def sample_data(self): method test_llm (line 41) | def test_llm(self): method test_modern_llm (line 56) | def test_modern_llm(self): method test_legacy_summary_score_vs_v2_summary_score_e2e_compatibility (line 71) | async def test_legacy_summary_score_vs_v2_summary_score_e2e_compatibil... method test_summary_score_weight_configuration (line 118) | async def test_summary_score_weight_configuration(self, test_modern_llm): method test_summary_score_parameter_validation (line 152) | async def test_summary_score_parameter_validation(self, test_modern_llm): method test_summary_score_migration_requirements_documented (line 175) | def test_summary_score_migration_requirements_documented(self): FILE: tests/e2e/metrics_migration/test_utils.py function create_legacy_sample (line 9) | def create_legacy_sample( function compare_scores_with_tolerance (line 44) | def compare_scores_with_tolerance( function assert_score_types (line 70) | def assert_score_types(legacy_score: Any, v2_result: MetricResult) -> None: function print_test_header (line 90) | def print_test_header( function print_score_comparison (line 112) | def print_score_comparison( function print_test_success (line 130) | def print_test_success(message: str = "Scores within tolerance!") -> None: function print_metric_specific_info (line 139) | def print_metric_specific_info(metric_name: str, description: str) -> None: FILE: tests/e2e/test_adaptation.py function test_adapt (line 11) | async def test_adapt(): FILE: tests/e2e/test_amnesty_in_ci.py function assert_in_range (line 22) | def assert_in_range(score: float, value: float, plus_or_minus: float): function test_amnesty_e2e (line 31) | def test_amnesty_e2e(): function test_assert_in_range (line 41) | def test_assert_in_range(): FILE: tests/e2e/test_dataset_utils.py function load_amnesty_dataset_safe (line 67) | def load_amnesty_dataset_safe(config: str = "english_v3"): function load_fiqa_dataset_safe (line 92) | def load_fiqa_dataset_safe(config: str = "ragas_eval_v3"): FILE: tests/e2e/test_dspy_integration.py function test_dspy_optimizer_import (line 15) | def test_dspy_optimizer_import(): function test_dspy_optimizer_basic_optimization (line 26) | def test_dspy_optimizer_basic_optimization(): function test_dspy_adapter_conversions (line 114) | def test_dspy_adapter_conversions(): FILE: tests/e2e/test_fullflow.py function test_evaluate_e2e (line 16) | def test_evaluate_e2e(): FILE: tests/e2e/test_langchain_llm_attributes.py function test_langchain_chat_models_have_temperature (line 36) | def test_langchain_chat_models_have_temperature(model): function test_langchain_chat_models_have_n (line 43) | def test_langchain_chat_models_have_n(model): FILE: tests/e2e/test_testset_generation.py function test_testset_generation_e2e (line 9) | def test_testset_generation_e2e(): FILE: tests/test_quoted_spans.py function test_perfect_match (line 16) | def test_perfect_match(): function test_mismatch_detected (line 26) | def test_mismatch_detected(): function test_mixed_case_and_whitespace (line 36) | def test_mixed_case_and_whitespace(): function test_no_quotes_returns_zero_with_zero_denominator (line 44) | def test_no_quotes_returns_zero_with_zero_denominator(): FILE: tests/unit/backends/test_gdrive_backend.py class HttpError (line 16) | class HttpError(Exception): method __init__ (line 17) | def __init__(self, resp, content): class SampleModel (line 26) | class SampleModel(BaseModel): class TestGDriveBackendAvailability (line 32) | class TestGDriveBackendAvailability: method test_gdrive_available_import (line 35) | def test_gdrive_available_import(self): class TestGDriveBackendInitialization (line 50) | class TestGDriveBackendInitialization: method test_service_account_auth_success (line 56) | def test_service_account_auth_success( method test_auth_failure_no_credentials (line 93) | def test_auth_failure_no_credentials(self, mock_exists, mock_build): method test_invalid_folder_id (line 103) | def test_invalid_folder_id(self, mock_exists, mock_credentials, mock_b... class TestGDriveBackendOperations (line 129) | class TestGDriveBackendOperations: method _create_mock_backend (line 132) | def _create_mock_backend(self): method test_spreadsheet_exists_check (line 145) | def test_spreadsheet_exists_check(self): method test_load_nonexistent_dataset (line 163) | def test_load_nonexistent_dataset(self): method test_load_dataset_success (line 175) | def test_load_dataset_success(self): method test_load_empty_dataset (line 202) | def test_load_empty_dataset(self): method test_save_dataset_success (line 217) | def test_save_dataset_success(self): method test_save_empty_dataset (line 243) | def test_save_empty_dataset(self): method test_list_datasets (line 259) | def test_list_datasets(self): method test_list_experiments (line 281) | def test_list_experiments(self): method test_complex_data_serialization (line 294) | def test_complex_data_serialization(self): class TestGDriveBackendIntegration (line 339) | class TestGDriveBackendIntegration: method test_backend_implements_basebackend (line 342) | def test_backend_implements_basebackend(self): method test_error_without_dependencies (line 362) | def test_error_without_dependencies(self): FILE: tests/unit/backends/test_inmemory.py class SimpleTestModel (line 18) | class SimpleTestModel(BaseModel): class ComplexTestModel (line 25) | class ComplexTestModel(BaseModel): function backend (line 34) | def backend(): function simple_data (line 40) | def simple_data(): function complex_data (line 50) | def complex_data(): class TestInMemoryBackendBasics (line 69) | class TestInMemoryBackendBasics: method test_backend_initialization (line 75) | def test_backend_initialization(self): method test_save_and_load_operations (line 90) | def test_save_and_load_operations(self, backend, simple_data): method test_save_and_load_complex_data (line 118) | def test_save_and_load_complex_data(self, backend, complex_data): method test_list_empty_operations (line 142) | def test_list_empty_operations(self, backend): method test_list_operations_after_saving (line 157) | def test_list_operations_after_saving(self, backend, simple_data): method test_save_empty_operations (line 181) | def test_save_empty_operations(self, backend): method test_overwrite_operations (line 204) | def test_overwrite_operations(self, backend, simple_data): method test_datasets_and_experiments_separate_storage (line 237) | def test_datasets_and_experiments_separate_storage(self, backend, simp... method test_data_model_parameter_ignored (line 264) | def test_data_model_parameter_ignored(self, backend, simple_data): class TestInMemoryBackendErrorHandling (line 291) | class TestInMemoryBackendErrorHandling: method test_load_nonexistent_dataset (line 294) | def test_load_nonexistent_dataset(self, backend): method test_load_nonexistent_experiment (line 306) | def test_load_nonexistent_experiment(self, backend): method test_none_values_handling (line 318) | def test_none_values_handling(self, backend): method test_unicode_and_special_characters (line 342) | def test_unicode_and_special_characters(self, backend): method test_large_dataset_handling (line 371) | def test_large_dataset_handling(self, backend): method test_deeply_nested_structures (line 395) | def test_deeply_nested_structures(self, backend): class TestInMemoryBackendIntegration (line 438) | class TestInMemoryBackendIntegration: method test_backend_registration (line 444) | def test_backend_registration(self): method test_dataset_with_inmemory_backend (line 464) | def test_dataset_with_inmemory_backend(self, backend, simple_data): method test_dataset_save_and_load_cycle (line 493) | def test_dataset_save_and_load_cycle(self, backend, simple_data): method test_dataset_train_test_split_uses_inmemory (line 520) | def test_dataset_train_test_split_uses_inmemory(self, simple_data): method test_train_test_split_comprehensive (line 561) | def test_train_test_split_comprehensive(self, simple_data): method test_pydantic_model_validation_with_inmemory (line 613) | def test_pydantic_model_validation_with_inmemory(self, backend, simple... class TestInMemoryBackendIsolation (line 657) | class TestInMemoryBackendIsolation: method test_multiple_backend_instances_isolation (line 660) | def test_multiple_backend_instances_isolation(self, simple_data): method test_concurrent_save_operations (line 690) | def test_concurrent_save_operations(self, simple_data): method test_concurrent_read_operations (line 738) | def test_concurrent_read_operations(self, backend, simple_data): method test_mixed_concurrent_operations (line 785) | def test_mixed_concurrent_operations(self, backend, simple_data): method test_memory_cleanup_on_overwrite (line 856) | def test_memory_cleanup_on_overwrite(self, backend, simple_data): class TestInMemoryBackendPerformance (line 898) | class TestInMemoryBackendPerformance: method test_complex_data_structure_preservation (line 901) | def test_complex_data_structure_preservation(self, backend): method test_edge_case_dataset_names (line 948) | def test_edge_case_dataset_names(self, backend, simple_data): FILE: tests/unit/backends/test_local_csv.py class SimpleTestModel (line 15) | class SimpleTestModel(BaseModel): class ComplexTestModel (line 22) | class ComplexTestModel(BaseModel): class NestedTestModel (line 30) | class NestedTestModel(BaseModel): function temp_dir (line 38) | def temp_dir(): function backend (line 45) | def backend(temp_dir): function simple_data (line 51) | def simple_data(): function complex_data (line 61) | def complex_data(): function nested_data (line 82) | def nested_data(): class TestBasicFunctionality (line 101) | class TestBasicFunctionality: method test_initialization (line 104) | def test_initialization(self, temp_dir): method test_get_data_dir (line 109) | def test_get_data_dir(self, backend): method test_get_file_path (line 117) | def test_get_file_path(self, backend): method test_save_and_load_simple_data (line 125) | def test_save_and_load_simple_data(self, backend, simple_data): method test_directory_creation (line 139) | def test_directory_creation(self, backend, simple_data): method test_list_datasets_and_experiments (line 155) | def test_list_datasets_and_experiments(self, backend, simple_data): method test_save_empty_data (line 173) | def test_save_empty_data(self, backend): class TestDataTypeEdgeCases (line 187) | class TestDataTypeEdgeCases: method test_nested_dictionaries (line 191) | def test_nested_dictionaries(self, backend): method test_lists_of_objects (line 216) | def test_lists_of_objects(self, backend): method test_mixed_types (line 240) | def test_mixed_types(self, backend): method test_datetime_objects (line 266) | def test_datetime_objects(self, backend): method test_complex_nested_structure (line 287) | def test_complex_nested_structure(self, backend): class TestBaseModelIntegration (line 314) | class TestBaseModelIntegration: method test_simple_basemodel_save_load (line 317) | def test_simple_basemodel_save_load(self, backend, simple_data): method test_complex_basemodel_roundtrip (line 337) | def test_complex_basemodel_roundtrip(self, backend, complex_data): method test_basemodel_type_coercion (line 349) | def test_basemodel_type_coercion(self, backend): class TestErrorHandling (line 366) | class TestErrorHandling: method test_load_nonexistent_file (line 369) | def test_load_nonexistent_file(self, backend): method test_unicode_and_special_characters (line 377) | def test_unicode_and_special_characters(self, backend): method test_csv_injection_protection (line 396) | def test_csv_injection_protection(self, backend): method test_empty_and_null_values (line 414) | def test_empty_and_null_values(self, backend): method test_large_text_fields (line 434) | def test_large_text_fields(self, backend): method test_malformed_csv_handling (line 452) | def test_malformed_csv_handling(self, backend, temp_dir): FILE: tests/unit/backends/test_local_jsonl.py class SimpleTestModel (line 16) | class SimpleTestModel(BaseModel): class ComplexTestModel (line 23) | class ComplexTestModel(BaseModel): class NestedTestModel (line 31) | class NestedTestModel(BaseModel): function temp_dir (line 39) | def temp_dir(): function jsonl_backend_fixture (line 46) | def jsonl_backend_fixture(temp_dir): function simple_data (line 52) | def simple_data(): function complex_data (line 62) | def complex_data(): function nested_data (line 83) | def nested_data(): class TestBasicFunctionality (line 102) | class TestBasicFunctionality: method test_initialization (line 105) | def test_initialization(self, temp_dir): method test_get_data_dir (line 110) | def test_get_data_dir(self, backend): method test_get_file_path (line 118) | def test_get_file_path(self, backend): method test_save_and_load_simple_data (line 126) | def test_save_and_load_simple_data(self, backend, simple_data): method test_directory_creation (line 141) | def test_directory_creation(self, backend, simple_data): method test_list_datasets_and_experiments (line 157) | def test_list_datasets_and_experiments(self, backend, simple_data): method test_save_empty_data (line 175) | def test_save_empty_data(self, backend): class TestDataTypeEdgeCases (line 189) | class TestDataTypeEdgeCases: method test_nested_dictionaries (line 192) | def test_nested_dictionaries(self, backend): method test_lists_of_objects (line 212) | def test_lists_of_objects(self, backend): method test_mixed_types (line 233) | def test_mixed_types(self, backend): method test_datetime_objects (line 255) | def test_datetime_objects(self, backend): method test_complex_nested_structure (line 285) | def test_complex_nested_structure(self, backend): class TestBaseModelIntegration (line 312) | class TestBaseModelIntegration: method test_simple_basemodel_save_load (line 315) | def test_simple_basemodel_save_load(self, backend, simple_data): method test_complex_basemodel_roundtrip (line 331) | def test_complex_basemodel_roundtrip(self, backend, complex_data): method test_basemodel_type_coercion (line 347) | def test_basemodel_type_coercion(self, backend): class TestErrorHandling (line 364) | class TestErrorHandling: method test_load_nonexistent_file (line 367) | def test_load_nonexistent_file(self, backend): method test_unicode_and_special_characters (line 375) | def test_unicode_and_special_characters(self, backend): method test_json_special_characters (line 394) | def test_json_special_characters(self, backend): method test_empty_and_null_values (line 414) | def test_empty_and_null_values(self, backend): method test_large_text_fields (line 436) | def test_large_text_fields(self, backend): method test_malformed_jsonl_handling (line 454) | def test_malformed_jsonl_handling(self, backend, temp_dir): function print_jsonl_content (line 476) | def print_jsonl_content(jsonl_backend, data_type, name): FILE: tests/unit/integrations/test_ag_ui.py class MockEvent (line 43) | class MockEvent: method __init__ (line 46) | def __init__(self, event_type: str, **kwargs): function basic_text_message_events (line 54) | def basic_text_message_events(): function tool_call_events (line 70) | def tool_call_events(): function test_import_error_without_ag_ui_protocol (line 95) | def test_import_error_without_ag_ui_protocol(): function test_basic_text_message_conversion (line 107) | def test_basic_text_message_conversion(basic_text_message_events): function test_message_with_metadata (line 120) | def test_message_with_metadata(basic_text_message_events): function test_message_without_metadata (line 136) | def test_message_without_metadata(basic_text_message_events): function test_tool_call_conversion (line 147) | def test_tool_call_conversion(tool_call_events): function test_tool_call_with_metadata (line 169) | def test_tool_call_with_metadata(tool_call_events): function test_step_context_in_metadata (line 181) | def test_step_context_in_metadata(): function test_messages_snapshot_conversion (line 201) | def test_messages_snapshot_conversion(): function test_snapshot_with_metadata (line 224) | def test_snapshot_with_metadata(): function test_non_message_events_filtered (line 239) | def test_non_message_events_filtered(): function test_incomplete_message_stream (line 259) | def test_incomplete_message_stream(caplog): function test_orphaned_content_event (line 276) | def test_orphaned_content_event(caplog): function test_tool_call_argument_parsing_error (line 290) | def test_tool_call_argument_parsing_error(caplog): function test_tool_call_result_retroactive_attachment (line 316) | def test_tool_call_result_retroactive_attachment(): function test_event_collector_reuse (line 365) | def test_event_collector_reuse(basic_text_message_events): function test_multiple_tool_calls_in_sequence (line 388) | def test_multiple_tool_calls_in_sequence(): function test_empty_event_list (line 415) | def test_empty_event_list(): function test_wrong_snapshot_type_error (line 423) | def test_wrong_snapshot_type_error(): function test_role_mapping (line 431) | def test_role_mapping(): function test_complex_conversation_flow (line 453) | def test_complex_conversation_flow(): function test_text_message_chunk (line 506) | def test_text_message_chunk(): function test_tool_call_chunk (line 523) | def test_tool_call_chunk(): function test_tool_call_chunk_with_dict_delta (line 546) | def test_tool_call_chunk_with_dict_delta(): function _has_fastapi_deps (line 596) | def _has_fastapi_deps(): function test_call_ag_ui_endpoint (line 609) | async def test_call_ag_ui_endpoint(): function test_call_ag_ui_endpoint_with_config (line 666) | async def test_call_ag_ui_endpoint_with_config(): function test_call_ag_ui_endpoint_malformed_json (line 711) | async def test_call_ag_ui_endpoint_malformed_json(): function test_convert_ragas_messages_to_ag_ui (line 758) | def test_convert_ragas_messages_to_ag_ui(): function test_extract_response (line 798) | def test_extract_response(): function test_extract_response_empty (line 813) | def test_extract_response_empty(): function test_extract_tool_calls (line 826) | def test_extract_tool_calls(): function test_extract_tool_calls_empty (line 852) | def test_extract_tool_calls_empty(): function test_extract_contexts (line 865) | def test_extract_contexts(): function test_extract_contexts_empty (line 882) | def test_extract_contexts_empty(): function test_build_sample_single_turn (line 900) | def test_build_sample_single_turn(): function test_build_sample_multi_turn_with_list_input (line 921) | def test_build_sample_multi_turn_with_list_input(): function test_build_sample_multi_turn_with_tool_calls (line 944) | def test_build_sample_multi_turn_with_tool_calls(): function test_run_ag_ui_row_processes_row (line 977) | async def test_run_ag_ui_row_processes_row(): function test_run_ag_ui_row_extracts_tool_results (line 1019) | async def test_run_ag_ui_row_extracts_tool_results(): function test_run_ag_ui_row_handles_empty_user_input (line 1066) | async def test_run_ag_ui_row_handles_empty_user_input(): function test_run_ag_ui_row_handles_none_user_input (line 1096) | async def test_run_ag_ui_row_handles_none_user_input(): function test_run_ag_ui_row_handles_multi_turn_input (line 1115) | async def test_run_ag_ui_row_handles_multi_turn_input(): function test_run_ag_ui_row_with_extra_headers (line 1158) | async def test_run_ag_ui_row_with_extra_headers(): function test_run_ag_ui_row_handles_endpoint_failure (line 1193) | async def test_run_ag_ui_row_handles_endpoint_failure(): FILE: tests/unit/integrations/test_tracing.py class TestLangfuseIntegration (line 15) | class TestLangfuseIntegration: method test_langfuse_imports_with_missing_dependency (line 18) | def test_langfuse_imports_with_missing_dependency(self): method test_langfuse_imports_with_dependency_available (line 32) | def test_langfuse_imports_with_dependency_available(self): method test_observe_decorator_fallback (line 46) | def test_observe_decorator_fallback(self): method test_langfuse_trace_initialization (line 58) | def test_langfuse_trace_initialization(self): method test_sync_trace_with_trace_id (line 74) | async def test_sync_trace_with_trace_id(self): method test_sync_trace_without_trace_id (line 93) | async def test_sync_trace_without_trace_id(self): method test_sync_trace_no_trace_found (line 110) | async def test_sync_trace_no_trace_found(self): method test_add_query_param (line 124) | def test_add_query_param(self): method test_add_query_param_existing_params (line 134) | def test_add_query_param_existing_params(self): class TestMLflowIntegration (line 145) | class TestMLflowIntegration: method test_mlflow_imports_with_missing_dependency (line 148) | def test_mlflow_imports_with_missing_dependency(self): method test_mlflow_imports_with_dependency_available (line 156) | def test_mlflow_imports_with_dependency_available(self): method test_mlflow_trace_initialization (line 168) | def test_mlflow_trace_initialization(self): method test_mlflow_trace_get_url_with_env (line 177) | def test_mlflow_trace_get_url_with_env(self): method test_mlflow_trace_get_url_no_env (line 195) | def test_mlflow_trace_get_url_no_env(self): method test_mlflow_trace_filter (line 209) | def test_mlflow_trace_filter(self): method test_mlflow_sync_trace_success (line 228) | async def test_mlflow_sync_trace_success(self): method test_mlflow_sync_trace_no_active_trace (line 250) | async def test_mlflow_sync_trace_no_active_trace(self): method test_mlflow_sync_trace_not_found (line 263) | async def test_mlflow_sync_trace_not_found(self): class TestTracingIntegrationInitModule (line 280) | class TestTracingIntegrationInitModule: method test_lazy_import_langfuse_functions (line 283) | def test_lazy_import_langfuse_functions(self): method test_lazy_import_mlflow_classes (line 291) | def test_lazy_import_mlflow_classes(self): method test_invalid_attribute_access (line 297) | def test_invalid_attribute_access(self): class TestTracingWithCallbackSystem (line 305) | class TestTracingWithCallbackSystem: method test_tracing_with_ragas_tracer (line 308) | def test_tracing_with_ragas_tracer(self): method test_callback_manager_compatibility (line 326) | def test_callback_manager_compatibility(self): FILE: tests/unit/integrations/test_tracing_simple.py function test_basic_tracing_import (line 8) | def test_basic_tracing_import(): function test_observe_decorator (line 19) | def test_observe_decorator(): function test_callback_compatibility (line 32) | def test_callback_compatibility(): function test_no_experimental_imports (line 51) | def test_no_experimental_imports(): FILE: tests/unit/llms/test_adapters.py class LLMResponseModel (line 11) | class LLMResponseModel(BaseModel): class MockClient (line 15) | class MockClient: method __init__ (line 18) | def __init__(self, is_async=False): class MockInstructor (line 40) | class MockInstructor: method __init__ (line 43) | def __init__(self, client): class TestAdapterRegistry (line 62) | class TestAdapterRegistry: method test_get_instructor_adapter (line 65) | def test_get_instructor_adapter(self): method test_get_litellm_adapter (line 70) | def test_get_litellm_adapter(self): method test_get_unknown_adapter_raises_error (line 75) | def test_get_unknown_adapter_raises_error(self): class MockNewGenAIClient (line 81) | class MockNewGenAIClient: method __init__ (line 86) | def __init__(self): class TestAutoDetectAdapter (line 92) | class TestAutoDetectAdapter: method test_auto_detect_google_provider_old_sdk_uses_litellm (line 95) | def test_auto_detect_google_provider_old_sdk_uses_litellm(self): method test_auto_detect_gemini_provider_old_sdk_uses_litellm (line 101) | def test_auto_detect_gemini_provider_old_sdk_uses_litellm(self): method test_auto_detect_google_provider_new_sdk_uses_instructor (line 107) | def test_auto_detect_google_provider_new_sdk_uses_instructor(self): method test_auto_detect_gemini_provider_new_sdk_uses_instructor (line 113) | def test_auto_detect_gemini_provider_new_sdk_uses_instructor(self): method test_auto_detect_openai_uses_instructor (line 119) | def test_auto_detect_openai_uses_instructor(self): method test_auto_detect_anthropic_uses_instructor (line 125) | def test_auto_detect_anthropic_uses_instructor(self): method test_auto_detect_litellm_client_uses_litellm_adapter (line 131) | def test_auto_detect_litellm_client_uses_litellm_adapter(self): method test_auto_detect_case_insensitive (line 140) | def test_auto_detect_case_insensitive(self): class TestInstructorAdapter (line 149) | class TestInstructorAdapter: method test_instructor_adapter_create_llm (line 152) | def test_instructor_adapter_create_llm(self, monkeypatch): method test_instructor_adapter_with_kwargs (line 168) | def test_instructor_adapter_with_kwargs(self, monkeypatch): method test_instructor_adapter_error_handling (line 185) | def test_instructor_adapter_error_handling(self, monkeypatch): class TestLiteLLMAdapter (line 200) | class TestLiteLLMAdapter: method test_litellm_adapter_create_llm (line 203) | def test_litellm_adapter_create_llm(self): method test_litellm_adapter_with_kwargs (line 213) | def test_litellm_adapter_with_kwargs(self): method test_litellm_adapter_returns_litellm_structured_llm (line 224) | def test_litellm_adapter_returns_litellm_structured_llm(self): class TestAdapterIntegration (line 235) | class TestAdapterIntegration: method test_llm_factory_with_explicit_adapter (line 238) | def test_llm_factory_with_explicit_adapter(self, monkeypatch): method test_llm_factory_auto_detects_google_provider (line 253) | def test_llm_factory_auto_detects_google_provider(self, monkeypatch): method test_llm_factory_invalid_adapter_raises_error (line 263) | def test_llm_factory_invalid_adapter_raises_error(self): FILE: tests/unit/llms/test_instructor_factory.py class LLMResponseModel (line 9) | class LLMResponseModel(BaseModel): class MockClient (line 13) | class MockClient: method __init__ (line 16) | def __init__(self, is_async=False): class MockInstructor (line 38) | class MockInstructor: method __init__ (line 41) | def __init__(self, client): function mock_sync_client (line 61) | def mock_sync_client(): function mock_async_client (line 67) | def mock_async_client(): function test_llm_factory_initialization (line 72) | def test_llm_factory_initialization(mock_sync_client, monkeypatch): function test_llm_factory_async_detection (line 87) | def test_llm_factory_async_detection(mock_async_client, monkeypatch): function test_llm_factory_with_model_args (line 100) | def test_llm_factory_with_model_args(mock_sync_client, monkeypatch): function test_unsupported_provider (line 116) | def test_unsupported_provider(monkeypatch): function test_sync_llm_generate (line 126) | def test_sync_llm_generate(mock_sync_client, monkeypatch): function test_async_llm_agenerate (line 143) | async def test_async_llm_agenerate(mock_async_client, monkeypatch): function test_sync_client_agenerate_error (line 159) | def test_sync_client_agenerate_error(mock_sync_client, monkeypatch): function test_provider_support (line 177) | def test_provider_support(monkeypatch): function test_llm_model_args_storage (line 209) | def test_llm_model_args_storage(mock_sync_client, monkeypatch): function test_llm_factory_missing_client (line 224) | def test_llm_factory_missing_client(): function test_llm_factory_missing_model (line 230) | def test_llm_factory_missing_model(): function test_openai_compatible_providers_with_openai_client (line 238) | def test_openai_compatible_providers_with_openai_client(monkeypatch): function test_llm_factory_with_custom_mode (line 268) | def test_llm_factory_with_custom_mode(mock_sync_client, monkeypatch): function test_llm_factory_default_mode_is_json (line 292) | def test_llm_factory_default_mode_is_json(mock_sync_client, monkeypatch): function test_llm_factory_mode_with_generic_provider (line 311) | def test_llm_factory_mode_with_generic_provider(monkeypatch): FILE: tests/unit/llms/test_llm.py class FakeTestLLM (line 13) | class FakeTestLLM(BaseRagasLLM): method llm (line 14) | def llm(self): method generate_text (line 17) | def generate_text( method agenerate_text (line 28) | async def agenerate_text( method is_finished (line 39) | def is_finished(self, response: LLMResult) -> bool: class MockLangchainLLM (line 43) | class MockLangchainLLM: method __init__ (line 46) | def __init__(self): method generate_prompt (line 51) | def generate_prompt(self, prompts, n=None, stop=None, callbacks=None): method agenerate_prompt (line 69) | async def agenerate_prompt(self, prompts, n=None, stop=None, callbacks... function create_mock_prompt (line 91) | def create_mock_prompt(): class TestLangchainLLMWrapperBypassN (line 98) | class TestLangchainLLMWrapperBypassN: method test_bypass_n_true_sync_does_not_pass_n (line 101) | def test_bypass_n_true_sync_does_not_pass_n(self): method test_bypass_n_false_sync_passes_n (line 120) | def test_bypass_n_false_sync_passes_n(self): method test_bypass_n_true_async_does_not_pass_n (line 139) | async def test_bypass_n_true_async_does_not_pass_n(self): method test_bypass_n_false_async_passes_n (line 155) | async def test_bypass_n_false_async_passes_n(self): method test_default_bypass_n_behavior (line 169) | def test_default_bypass_n_behavior(self): method test_default_bypass_n_behavior_async (line 188) | async def test_default_bypass_n_behavior_async(self): method test_bypass_n_true_with_multiple_completion_supported (line 202) | def test_bypass_n_true_with_multiple_completion_supported(self): method test_bypass_n_true_with_multiple_completion_supported_async (line 222) | async def test_bypass_n_true_with_multiple_completion_supported_async(... FILE: tests/unit/llms/test_system_prompt.py class ResponseModel (line 10) | class ResponseModel(BaseModel): class MockInstructorClient (line 14) | class MockInstructorClient: method __init__ (line 15) | def __init__(self, is_async=False): class TestInstructorLLMSystemPrompt (line 37) | class TestInstructorLLMSystemPrompt: method test_system_prompt_via_model_args (line 38) | def test_system_prompt_via_model_args(self): method test_system_prompt_via_kwargs (line 55) | def test_system_prompt_via_kwargs(self): method test_no_system_prompt (line 72) | def test_no_system_prompt(self): method test_system_prompt_async (line 84) | async def test_system_prompt_async(self): method test_no_system_prompt_async (line 101) | async def test_no_system_prompt_async(self): method test_system_prompt_not_in_model_args_dict (line 111) | def test_system_prompt_not_in_model_args_dict(self): class TestLiteLLMStructuredLLMSystemPrompt (line 125) | class TestLiteLLMStructuredLLMSystemPrompt: method test_system_prompt_parameter (line 126) | def test_system_prompt_parameter(self): method test_no_system_prompt (line 144) | def test_no_system_prompt(self): method test_system_prompt_async (line 157) | async def test_system_prompt_async(self): method test_no_system_prompt_async (line 175) | async def test_no_system_prompt_async(self): method test_system_prompt_with_other_kwargs (line 187) | def test_system_prompt_with_other_kwargs(self): class TestLLMFactorySystemPrompt (line 203) | class TestLLMFactorySystemPrompt: method test_llm_factory_with_system_prompt (line 204) | def test_llm_factory_with_system_prompt(self, monkeypatch): method test_llm_factory_litellm_with_system_prompt (line 224) | def test_llm_factory_litellm_with_system_prompt(self): FILE: tests/unit/prompt/test_base_prompt.py class DummyPrompt (line 8) | class DummyPrompt(BasePrompt): method generate (line 9) | async def generate(self, llm, data, temperature=None, stop=None, callb... method generate_multiple (line 12) | def generate_multiple( class TestBasePromptSaveLoad (line 18) | class TestBasePromptSaveLoad: method test_save_basic (line 19) | def test_save_basic(self, tmp_path): method test_save_with_language (line 33) | def test_save_with_language(self, tmp_path): method test_save_with_hash (line 44) | def test_save_with_hash(self, tmp_path): method test_save_file_already_exists (line 57) | def test_save_file_already_exists(self, tmp_path): method test_load_basic (line 66) | def test_load_basic(self, tmp_path): method test_load_with_hash (line 76) | def test_load_with_hash(self, tmp_path): method test_load_nonexistent_file (line 88) | def test_load_nonexistent_file(self, tmp_path): method test_round_trip (line 94) | def test_round_trip(self, tmp_path): method test_load_version_mismatch_warning (line 106) | def test_load_version_mismatch_warning(self, tmp_path, caplog): method test_save_unicode_language (line 122) | def test_save_unicode_language(self, tmp_path): method test_load_missing_fields (line 136) | def test_load_missing_fields(self, tmp_path): FILE: tests/unit/prompt/test_dynamic_few_shot_prompt.py class MockResponseModel (line 13) | class MockResponseModel(BaseModel): class MockEmbeddingModel (line 24) | class MockEmbeddingModel(BaseEmbedding): method __init__ (line 27) | def __init__(self, dimension: int = 384): method _generate_embedding (line 32) | def _generate_embedding(self, text: str) -> list[float]: method embed_text (line 46) | def embed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method aembed_text (line 50) | async def aembed_text(self, text: str, **kwargs: t.Any) -> t.List[float]: method embed_query (line 54) | def embed_query(self, text: str) -> t.List[float]: method aembed_query (line 58) | async def aembed_query(self, text: str) -> t.List[float]: method embed_documents (line 62) | def embed_documents(self, texts: t.List[str]) -> t.List[t.List[float]]: method aembed_documents (line 66) | async def aembed_documents(self, texts: t.List[str]) -> t.List[t.List[... method call_count (line 71) | def call_count(self): class TestDynamicFewShotPromptSaveLoad (line 75) | class TestDynamicFewShotPromptSaveLoad: method test_save_load_without_embedding_model (line 78) | def test_save_load_without_embedding_model(self, tmp_path): method test_save_load_with_compression (line 123) | def test_save_load_with_compression(self, tmp_path): method test_save_load_with_embedding_model (line 154) | def test_save_load_with_embedding_model(self, tmp_path): method test_embedding_recomputation_on_load (line 205) | def test_embedding_recomputation_on_load(self, tmp_path): method test_include_embeddings_parameter (line 240) | def test_include_embeddings_parameter(self, tmp_path): method test_json_structure_validation (line 276) | def test_json_structure_validation(self, tmp_path): method test_warning_messages (line 318) | def test_warning_messages(self, tmp_path): method test_error_conditions (line 358) | def test_error_conditions(self, tmp_path): method test_response_model_requirements (line 388) | def test_response_model_requirements(self, tmp_path): method test_round_trip_data_preservation (line 409) | def test_round_trip_data_preservation(self, tmp_path): method test_empty_example_store_handling (line 457) | def test_empty_example_store_handling(self, tmp_path): method test_unicode_handling (line 475) | def test_unicode_handling(self, tmp_path): FILE: tests/unit/prompt/test_prompt_mixin.py function test_prompt_save_load (line 6) | def test_prompt_save_load(tmp_path, fake_llm): function test_prompt_save_adapt_load (line 18) | async def test_prompt_save_adapt_load(tmp_path, fake_llm): FILE: tests/unit/prompt/test_prompt_save_load.py class MockResponseModel (line 11) | class MockResponseModel(BaseModel): class TestPromptSaveLoad (line 22) | class TestPromptSaveLoad: method test_save_load_basic_without_response_model (line 25) | def test_save_load_basic_without_response_model(self, tmp_path): method test_save_load_with_gzip_compression (line 58) | def test_save_load_with_gzip_compression(self, tmp_path): method test_save_with_response_model_shows_warning (line 80) | def test_save_with_response_model_shows_warning(self, tmp_path): method test_load_requires_response_model_when_expected (line 103) | def test_load_requires_response_model_when_expected(self, tmp_path): method test_load_with_response_model_succeeds (line 122) | def test_load_with_response_model_succeeds(self, tmp_path): method test_response_model_schema_validation_warning (line 140) | def test_response_model_schema_validation_warning(self, tmp_path): method test_file_validation_errors (line 162) | def test_file_validation_errors(self, tmp_path): method test_save_file_permission_error (line 184) | def test_save_file_permission_error(self, tmp_path): method test_round_trip_preserves_data (line 193) | def test_round_trip_preserves_data(self, tmp_path): method test_empty_examples_handling (line 220) | def test_empty_examples_handling(self, tmp_path): method test_unicode_characters_handling (line 232) | def test_unicode_characters_handling(self, tmp_path): FILE: tests/unit/prompt/test_prompt_utils.py class Category (line 9) | class Category(BaseModel): class Categories (line 16) | class Categories(BaseModel): function test_get_all_strings (line 109) | def test_get_all_strings(obj, expected): function test_update_strings (line 120) | def test_update_strings(obj, old_strings, new_strings): class TestExtractJson (line 127) | class TestExtractJson: method test_extract_json (line 152) | def test_extract_json(self, text, expected): method test_extract_empty_array (line 155) | def test_extract_empty_array(self): method test_extract_empty_object (line 160) | def test_extract_empty_object(self): method test_extract_incomplete_json (line 165) | def test_extract_incomplete_json(self): method test_markdown_json (line 170) | def test_markdown_json(self): FILE: tests/unit/test_analytics.py class EchoLLM (line 16) | class EchoLLM(BaseRagasLLM): method generate_text (line 17) | def generate_text( # type: ignore method agenerate_text (line 23) | async def agenerate_text( # type: ignore method is_finished (line 29) | def is_finished(self, response: LLMResult) -> bool: function test_debug_tracking_flag (line 33) | def test_debug_tracking_flag(monkeypatch): function test_base_event (line 42) | def test_base_event(): function test_evaluation_event (line 50) | def test_evaluation_event(): function setup_user_id_filepath (line 67) | def setup_user_id_filepath(tmp_path, monkeypatch): function test_write_to_file (line 81) | def test_write_to_file(tmp_path, monkeypatch): function test_load_userid_from_json_file (line 107) | def test_load_userid_from_json_file(tmp_path, monkeypatch): function test_testset_generation_tracking (line 126) | def test_testset_generation_tracking(monkeypatch): function test_was_completed (line 167) | def test_was_completed(monkeypatch): function test_analytics_batcher_join_evaluation_events (line 251) | def test_analytics_batcher_join_evaluation_events( function test_analytics_batcher_flush (line 270) | def test_analytics_batcher_flush(monkeypatch, evaluation_events, expecte... FILE: tests/unit/test_async_evaluation.py class TestAsyncUtilsControl (line 8) | class TestAsyncUtilsControl: method test_run_with_nest_asyncio_default (line 11) | def test_run_with_nest_asyncio_default(self): method test_run_without_nest_asyncio (line 24) | def test_run_without_nest_asyncio(self): class TestEvaluateAsyncControl (line 38) | class TestEvaluateAsyncControl: method test_evaluate_with_nest_asyncio_default (line 41) | def test_evaluate_with_nest_asyncio_default(self): method test_evaluate_allow_nest_asyncio_true (line 64) | def test_evaluate_allow_nest_asyncio_true(self): method test_evaluate_allow_nest_asyncio_false (line 88) | def test_evaluate_allow_nest_asyncio_false(self): class TestAevaluateImport (line 116) | class TestAevaluateImport: method test_aevaluate_importable (line 119) | def test_aevaluate_importable(self): method test_evaluate_has_allow_nest_asyncio_param (line 126) | def test_evaluate_has_allow_nest_asyncio_param(self): class TestNestAsyncioNotAppliedInAevaluate (line 137) | class TestNestAsyncioNotAppliedInAevaluate: method test_aevaluate_no_nest_asyncio_applied (line 141) | async def test_aevaluate_no_nest_asyncio_applied(self): class TestAsyncIntegration (line 187) | class TestAsyncIntegration: method test_aevaluate_in_running_loop (line 191) | async def test_aevaluate_in_running_loop(self): FILE: tests/unit/test_async_utils.py function test_is_event_loop_running_in_script (line 8) | def test_is_event_loop_running_in_script(): function test_as_completed_in_script (line 14) | def test_as_completed_in_script(): function test_as_completed_max_workers (line 35) | def test_as_completed_max_workers(): function test_run_function (line 60) | def test_run_function(): function tasks (line 71) | def tasks(): function test_run_async_tasks_unbatched (line 78) | def test_run_async_tasks_unbatched(tasks): function test_run_async_tasks_batched (line 83) | def test_run_async_tasks_batched(tasks): function test_run_async_tasks_no_progress (line 88) | def test_run_async_tasks_no_progress(tasks): FILE: tests/unit/test_average_precision_algorithm.py function calculate_average_precision_original (line 11) | def calculate_average_precision_original(verdict_list: List[int]) -> float: function calculate_average_precision_optimized (line 26) | def calculate_average_precision_optimized(verdict_list: List[int]) -> fl... class TestAveragePrecisionAlgorithm (line 39) | class TestAveragePrecisionAlgorithm: method test_optimized_matches_original (line 56) | def test_optimized_matches_original(self, verdict_list): method test_known_example_1_0_1 (line 62) | def test_known_example_1_0_1(self): method test_known_example_1_1_0_1 (line 68) | def test_known_example_1_1_0_1(self): method test_early_positives_score_higher (line 74) | def test_early_positives_score_higher(self): method test_random_inputs (line 81) | def test_random_inputs(self, seed): FILE: tests/unit/test_cache.py function temp_cache_dir (line 10) | def temp_cache_dir(tmp_path): function cache_backend (line 16) | def cache_backend(temp_cache_dir): function test_make_hashable (line 21) | def test_make_hashable(): function test_generate_cache_key (line 29) | def test_generate_cache_key(): function test_generate_cache_key_bound_method (line 43) | def test_generate_cache_key_bound_method(): function test_no_cache_backend (line 63) | def test_no_cache_backend(): function test_caching_with_cache_backend (line 78) | def test_caching_with_cache_backend(cache_backend): function test_async_caching_with_cache_backend (line 99) | async def test_async_caching_with_cache_backend(cache_backend): function test_caching_with_different_args (line 121) | def test_caching_with_different_args(cache_backend): FILE: tests/unit/test_cancellation.py class TestExecutorCancellation (line 18) | class TestExecutorCancellation: method test_executor_cancel_method_exists (line 21) | def test_executor_cancel_method_exists(self): method test_executor_cancellation_state (line 29) | def test_executor_cancellation_state(self): method test_executor_cancel_idempotent (line 40) | def test_executor_cancel_idempotent(self): method test_executor_respects_cancellation (line 51) | def test_executor_respects_cancellation(self): class TestEvaluateCancellation (line 71) | class TestEvaluateCancellation: method create_test_dataset (line 74) | def create_test_dataset(self): method test_evaluate_return_executor_parameter (line 88) | def test_evaluate_return_executor_parameter(self): method test_evaluate_default_behavior_unchanged (line 98) | def test_evaluate_default_behavior_unchanged(self): method test_evaluate_executor_cancellation (line 115) | def test_evaluate_executor_cancellation(self): class TestGeneratorCancellation (line 129) | class TestGeneratorCancellation: method test_generate_with_langchain_docs_return_executor_parameter (line 132) | def test_generate_with_langchain_docs_return_executor_parameter(self): method test_generate_method_return_executor_parameter (line 152) | def test_generate_method_return_executor_parameter(self): class TestCancellationIntegration (line 170) | class TestCancellationIntegration: method test_cancellation_thread_safety (line 173) | def test_cancellation_thread_safety(self): method test_multiple_executors_isolation (line 192) | def test_multiple_executors_isolation(self): method test_cancellation_with_empty_job_list (line 206) | def test_cancellation_with_empty_job_list(self): class TestCancellationDocumentationExamples (line 219) | class TestCancellationDocumentationExamples: method test_timeout_pattern_example (line 222) | def test_timeout_pattern_example(self): method test_evaluation_manager_example (line 272) | def test_evaluation_manager_example(self): FILE: tests/unit/test_chrf_score.py function mock_sacrebleu (line 11) | def mock_sacrebleu(): function test_chrf_score_init_sacrebleu_import (line 17) | def test_chrf_score_init_sacrebleu_import(): function test_chrf_score_init_sacrebleu_import_error (line 27) | def test_chrf_score_init_sacrebleu_import_error(): function test_chrf_score_single_turn_ascore (line 35) | async def test_chrf_score_single_turn_ascore(mock_sacrebleu): function test_chrf_score_single_turn_ascore_none_values (line 57) | async def test_chrf_score_single_turn_ascore_none_values(mock_sacrebleu): function test_chrf_score_ascore (line 73) | async def test_chrf_score_ascore(mock_sacrebleu): FILE: tests/unit/test_chrf_score_collections.py class TestCHRFScoreCollections (line 13) | class TestCHRFScoreCollections: method test_init_default_values (line 16) | def test_init_default_values(self): method test_init_custom_name (line 22) | def test_init_custom_name(self): method test_init_with_kwargs (line 27) | def test_init_with_kwargs(self): method test_perfect_match (line 33) | async def test_perfect_match(self): method test_partial_match (line 44) | async def test_partial_match(self): method test_no_match (line 55) | async def test_no_match(self): method test_empty_reference (line 67) | async def test_empty_reference(self): method test_empty_response (line 76) | async def test_empty_response(self): method test_whitespace_only_input (line 85) | async def test_whitespace_only_input(self): method test_invalid_reference_type (line 94) | async def test_invalid_reference_type(self): method test_invalid_response_type (line 103) | async def test_invalid_response_type(self): method test_similar_texts (line 112) | async def test_similar_texts(self): method test_score_is_between_0_and_1 (line 124) | async def test_score_is_between_0_and_1(self): method test_sync_score_method (line 134) | def test_sync_score_method(self): method test_unicode_text (line 145) | async def test_unicode_text(self): method test_mixed_case (line 156) | async def test_mixed_case(self): method test_with_beta_parameter (line 169) | async def test_with_beta_parameter(self): FILE: tests/unit/test_cli.py function test_cli_help (line 8) | def test_cli_help(): function test_hello_world_help (line 16) | def test_hello_world_help(): function test_evals_help (line 24) | def test_evals_help(): function test_quickstart_help (line 32) | def test_quickstart_help(): function test_quickstart_list_templates (line 40) | def test_quickstart_list_templates(): function test_quickstart_invalid_template (line 51) | def test_quickstart_invalid_template(): function test_quickstart_creates_project (line 59) | def test_quickstart_creates_project(tmp_path): FILE: tests/unit/test_cosine_relationship_builders.py function generate_test_vectors (line 16) | def generate_test_vectors( function cosine_similarity_matrix (line 76) | def cosine_similarity_matrix(embeddings: np.ndarray): function cosine_similarity_pair (line 87) | def cosine_similarity_pair(embeddings: np.ndarray, threshold: float): function vector_cosine_similarity (line 101) | def vector_cosine_similarity(a, b): function simple_kg (line 107) | def simple_kg(): function test__cosine_similarity (line 156) | def test__cosine_similarity(n_test_embeddings): function test__find_similar_embedding_pairs (line 193) | def test__find_similar_embedding_pairs(n_test_embeddings, threshold, blo... class TestCosineSimilarityBuilder (line 225) | class TestCosineSimilarityBuilder: method test_no_self_similarity_relationships (line 227) | async def test_no_self_similarity_relationships(self, simple_kg): method test_no_duplicate_relationships (line 236) | async def test_no_duplicate_relationships(self, simple_kg): method test_similarity_at_threshold (line 246) | async def test_similarity_at_threshold(self): method test_all_below_threshold (line 255) | async def test_all_below_threshold(self): method test_all_above_threshold (line 266) | async def test_all_above_threshold(self): method test_malformed_embedding_raises (line 276) | async def test_malformed_embedding_raises(self): method test_cosine_similarity_builder_empty_graph (line 285) | async def test_cosine_similarity_builder_empty_graph(self): method test_cosine_similarity_builder_basic (line 292) | async def test_cosine_similarity_builder_basic(self, simple_kg): method test_cosine_similarity_builder_no_embeddings (line 313) | async def test_cosine_similarity_builder_no_embeddings(self): method test_cosine_similarity_builder_shape_validation (line 325) | async def test_cosine_similarity_builder_shape_validation(self): method test_apply_transforms_cosine_similarity_builder (line 342) | async def test_apply_transforms_cosine_similarity_builder(self, simple... class TestSummaryCosineSimilarityBuilder (line 369) | class TestSummaryCosineSimilarityBuilder: method test_summary_cosine_similarity_builder_basic (line 371) | async def test_summary_cosine_similarity_builder_basic(self, simple_kg): method test_summary_cosine_similarity_only_document_nodes (line 390) | async def test_summary_cosine_similarity_only_document_nodes(self): method test_summary_cosine_similarity_builder_filter_and_error (line 403) | async def test_summary_cosine_similarity_builder_filter_and_error(self): function test_apply_transforms_summary_cosine_similarity_builder (line 411) | async def test_apply_transforms_summary_cosine_similarity_builder(simple... FILE: tests/unit/test_cost.py function test_token_usage (line 24) | def test_token_usage(): function test_token_usage_cost (line 49) | def test_token_usage_cost(): function test_parse_llm_results (line 146) | def test_parse_llm_results(): function test_azure_ai_edge_cases (line 178) | def test_azure_ai_edge_cases(): function test_cost_callback_handler (line 219) | def test_cost_callback_handler(): FILE: tests/unit/test_datacompy_score_collections.py class TestDataCompyScoreCollections (line 22) | class TestDataCompyScoreCollections: method test_init_default_values (line 25) | def test_init_default_values(self): method test_init_custom_values (line 32) | def test_init_custom_values(self): method test_init_invalid_mode (line 39) | def test_init_invalid_mode(self): method test_init_invalid_metric (line 44) | def test_init_invalid_metric(self): method test_perfect_match_rows (line 52) | async def test_perfect_match_rows(self): method test_partial_match_rows_f1 (line 63) | async def test_partial_match_rows_f1(self): method test_precision_mode (line 77) | async def test_precision_mode(self): method test_recall_mode (line 89) | async def test_recall_mode(self): method test_columns_mode (line 101) | async def test_columns_mode(self): method test_columns_mode_partial_match (line 112) | async def test_columns_mode_partial_match(self): method test_invalid_reference_type (line 125) | async def test_invalid_reference_type(self): method test_invalid_response_type (line 133) | async def test_invalid_response_type(self): method test_no_matching_rows (line 141) | async def test_no_matching_rows(self): method test_result_reason_contains_info (line 153) | async def test_result_reason_contains_info(self): method test_empty_dataframes (line 166) | async def test_empty_dataframes(self): method test_csv_parse_error_returns_nan (line 178) | async def test_csv_parse_error_returns_nan(self): method test_sync_score_method (line 190) | def test_sync_score_method(self): FILE: tests/unit/test_dataset_schema.py function create_sample_annotation (line 24) | def create_sample_annotation(metric_output): function test_loader_sample (line 48) | def test_loader_sample(): function test_loader_batch (line 61) | def test_loader_batch(): function test_evaluation_dataset (line 74) | def test_evaluation_dataset(eval_sample): function test_evaluation_dataset_save_load_csv (line 89) | def test_evaluation_dataset_save_load_csv(tmpdir, eval_sample): function test_evaluation_dataset_save_load_jsonl (line 98) | def test_evaluation_dataset_save_load_jsonl(tmpdir, eval_sample): function test_evaluation_dataset_load_from_hf (line 109) | def test_evaluation_dataset_load_from_hf(eval_sample): function test_single_turn_sample_metadata_roundtrip_hf_and_jsonl (line 118) | def test_single_turn_sample_metadata_roundtrip_hf_and_jsonl(tmpdir): function test_single_type_evaluation_dataset (line 146) | def test_single_type_evaluation_dataset(eval_sample): function test_base_eval_sample (line 165) | def test_base_eval_sample(): function test_evaluation_dataset_iter (line 178) | def test_evaluation_dataset_iter(): function test_evaluation_dataset_type (line 187) | def test_evaluation_dataset_type(): function test_multiturn_sample_validate_user_input_invalid_type (line 201) | def test_multiturn_sample_validate_user_input_invalid_type(): function test_multiturn_sample_validate_user_input_valid_types (line 214) | def test_multiturn_sample_validate_user_input_valid_types(): FILE: tests/unit/test_datatable_inheritance.py class SimpleTestModel (line 15) | class SimpleTestModel(BaseModel): class ComplexTestModel (line 21) | class ComplexTestModel(BaseModel): function temp_dir (line 29) | def temp_dir(): function mock_backend (line 36) | def mock_backend(temp_dir): function simple_test_data (line 42) | def simple_test_data(): function complex_test_data (line 52) | def complex_test_data(): class TestDataTableInheritance (line 68) | class TestDataTableInheritance: method test_dataset_load_returns_dataset (line 71) | def test_dataset_load_returns_dataset(self, mock_backend, simple_test_... method test_dataset_load_with_model_returns_dataset (line 85) | def test_dataset_load_with_model_returns_dataset( method test_dataset_validate_with_returns_dataset (line 99) | def test_dataset_validate_with_returns_dataset( method test_experiment_load_returns_experiment (line 113) | def test_experiment_load_returns_experiment(self, mock_backend, simple... method test_experiment_load_with_model_returns_experiment (line 126) | def test_experiment_load_with_model_returns_experiment( method test_experiment_validate_with_returns_experiment (line 142) | def test_experiment_validate_with_returns_experiment( class TestDatasetMethods (line 159) | class TestDatasetMethods: method test_dataset_type_preservation_through_operations (line 162) | def test_dataset_type_preservation_through_operations( method test_dataset_str_representation (line 177) | def test_dataset_str_representation(self, mock_backend, simple_test_da... class TestExperimentMethods (line 187) | class TestExperimentMethods: method test_experiment_type_preservation_through_operations (line 190) | def test_experiment_type_preservation_through_operations( method test_experiment_str_representation (line 205) | def test_experiment_str_representation(self, mock_backend, simple_test... class TestTypeAnnotations (line 215) | class TestTypeAnnotations: method test_dataset_load_type_annotation (line 218) | def test_dataset_load_type_annotation(self, mock_backend, simple_test_... method test_dataset_validate_with_type_annotation (line 227) | def test_dataset_validate_with_type_annotation( method test_experiment_load_type_annotation (line 237) | def test_experiment_load_type_annotation(self, mock_backend, simple_te... method test_experiment_validate_with_type_annotation (line 246) | def test_experiment_validate_with_type_annotation( class TestComplexDataHandling (line 257) | class TestComplexDataHandling: method test_dataset_complex_data_preservation (line 260) | def test_dataset_complex_data_preservation(self, mock_backend, complex... method test_experiment_complex_data_preservation (line 274) | def test_experiment_complex_data_preservation( FILE: tests/unit/test_domain_specific_rubrics_collections.py class MockInstructorLLM (line 20) | class MockInstructorLLM(InstructorBaseRagasLLM): method __init__ (line 23) | def __init__(self): method generate (line 27) | def generate(self, prompt, response_model): method agenerate (line 30) | async def agenerate(self, prompt, response_model): function mock_llm (line 35) | def mock_llm(): class TestDomainSpecificRubricsCollections (line 40) | class TestDomainSpecificRubricsCollections: method test_perfect_score (line 44) | async def test_perfect_score(self, mock_llm): method test_low_score (line 61) | async def test_low_score(self, mock_llm): method test_medium_score (line 78) | async def test_medium_score(self, mock_llm): method test_with_reference (line 94) | async def test_with_reference(self, mock_llm): method test_with_contexts (line 111) | async def test_with_contexts(self, mock_llm): method test_custom_rubrics (line 129) | async def test_custom_rubrics(self, mock_llm): method test_rubrics_score_without_reference_class (line 157) | async def test_rubrics_score_without_reference_class(self, mock_llm): method test_rubrics_score_with_reference_class (line 176) | async def test_rubrics_score_with_reference_class(self, mock_llm): method test_default_rubrics_without_reference (line 195) | def test_default_rubrics_without_reference(self, mock_llm): method test_default_rubrics_with_reference (line 200) | def test_default_rubrics_with_reference(self, mock_llm): method test_rubrics_in_prompt (line 205) | def test_rubrics_in_prompt(self, mock_llm): method test_custom_name (line 211) | def test_custom_name(self, mock_llm): method test_all_optional_inputs (line 217) | async def test_all_optional_inputs(self, mock_llm): method test_feedback_in_result_reason (line 231) | async def test_feedback_in_result_reason(self, mock_llm): method test_allowed_values_range (line 247) | def test_allowed_values_range(self, mock_llm): FILE: tests/unit/test_dspy_adapter.py class TestPydanticPromptToDSPySignature (line 22) | class TestPydanticPromptToDSPySignature: method test_basic_conversion (line 24) | def test_basic_conversion(self): method test_import_error_without_dspy (line 50) | def test_import_error_without_dspy(self): method test_field_descriptions (line 60) | def test_field_descriptions(self): class TestRagasDatasetToDSPyExamples (line 89) | class TestRagasDatasetToDSPyExamples: method test_basic_conversion (line 91) | def test_basic_conversion(self): method test_skip_non_accepted_samples (line 119) | def test_skip_non_accepted_samples(self): method test_skip_missing_prompt_name (line 150) | def test_skip_missing_prompt_name(self): method test_edited_output_priority (line 174) | def test_edited_output_priority(self): method test_string_output_in_dict (line 199) | def test_string_output_in_dict(self): method test_import_error_without_dspy (line 223) | def test_import_error_without_dspy(self): class TestCreateDSPyMetric (line 237) | class TestCreateDSPyMetric: method test_basic_metric_conversion (line 238) | def test_basic_metric_conversion(self): method test_metric_with_missing_ground_truth (line 256) | def test_metric_with_missing_ground_truth(self): method test_metric_with_missing_prediction (line 271) | def test_metric_with_missing_prediction(self): method test_metric_negation (line 287) | def test_metric_negation(self): class TestSetupDSPyLLM (line 305) | class TestSetupDSPyLLM: method test_setup_configures_dspy (line 307) | def test_setup_configures_dspy(self, mock_wrapper_class, fake_llm): FILE: tests/unit/test_dspy_optimizer.py class TestDSPyOptimizer (line 16) | class TestDSPyOptimizer: method test_import_error_without_dspy (line 18) | def test_import_error_without_dspy(self): method test_initialization_with_default_params (line 26) | def test_initialization_with_default_params(self): method test_initialization_with_custom_params (line 39) | def test_initialization_with_custom_params(self): method test_initialization_with_all_params (line 56) | def test_initialization_with_all_params(self): method test_validation_negative_num_candidates (line 89) | def test_validation_negative_num_candidates(self): method test_validation_negative_max_bootstrapped_demos (line 97) | def test_validation_negative_max_bootstrapped_demos(self): method test_validation_negative_max_labeled_demos (line 107) | def test_validation_negative_max_labeled_demos(self): method test_validation_zero_init_temperature (line 115) | def test_validation_zero_init_temperature(self): method test_validation_invalid_auto (line 123) | def test_validation_invalid_auto(self): method test_validation_negative_num_threads (line 131) | def test_validation_negative_num_threads(self): method test_validation_negative_max_errors (line 139) | def test_validation_negative_max_errors(self): method test_validation_invalid_metric_threshold (line 147) | def test_validation_invalid_metric_threshold(self): method test_optimize_without_metric (line 162) | def test_optimize_without_metric(self, fake_llm): method test_optimize_without_llm (line 176) | def test_optimize_without_llm(self, fake_llm): method test_optimize_basic_flow (line 195) | def test_optimize_basic_flow( method test_optimize_with_custom_params (line 278) | def test_optimize_with_custom_params( method test_extract_instruction_from_signature (line 357) | def test_extract_instruction_from_signature(self): method test_extract_instruction_from_docstring (line 370) | def test_extract_instruction_from_docstring(self): method test_extract_instruction_from_extended_signature (line 384) | def test_extract_instruction_from_extended_signature(self): method test_extract_instruction_fallback (line 398) | def test_extract_instruction_fallback(self): method test_cache_key_generation (line 410) | def test_cache_key_generation(self, fake_llm): method test_cache_key_different_for_different_inputs (line 434) | def test_cache_key_different_for_different_inputs(self, fake_llm): method test_cache_hit (line 463) | def test_cache_hit( method test_cache_miss (line 531) | def test_cache_miss( method test_optimize_without_cache (line 600) | def test_optimize_without_cache(self, fake_llm): FILE: tests/unit/test_embeddings.py function test_basic_legacy_imports (line 4) | def test_basic_legacy_imports(): function test_debug_base_module (line 12) | def test_debug_base_module(): function test_direct_import_from_base (line 31) | def test_direct_import_from_base(): function test_main_module_import (line 53) | def test_main_module_import(): function test_backward_compatibility_alias (line 72) | def test_backward_compatibility_alias(): FILE: tests/unit/test_embeddings_caching.py function test_embeddings_cache_hit (line 11) | def test_embeddings_cache_hit(tmp_path): function test_embeddings_cache_miss_different_text (line 33) | def test_embeddings_cache_miss_different_text(tmp_path): function test_embeddings_cache_batch_benefits (line 52) | def test_embeddings_cache_batch_benefits(tmp_path): function test_embeddings_cache_async (line 75) | async def test_embeddings_cache_async(tmp_path): function test_embeddings_no_cache_parameter (line 98) | def test_embeddings_no_cache_parameter(tmp_path): function test_cache_persistence_across_sessions (line 112) | def test_cache_persistence_across_sessions(tmp_path): FILE: tests/unit/test_engine.py class DummyTransformation (line 12) | class DummyTransformation(BaseGraphTransformation): method __init__ (line 13) | def __init__(self, name="Dummy"): method generate_execution_plan (line 16) | def generate_execution_plan(self, kg): method transform (line 19) | async def transform( method double (line 28) | async def double(self, node): function kg (line 37) | def kg(): function test_parallel_stores_transformations (line 50) | def test_parallel_stores_transformations(): function test_parallel_generate_execution_plan_aggregates (line 57) | def test_parallel_generate_execution_plan_aggregates(kg): function test_parallel_nested (line 72) | def test_parallel_nested(kg): function test_get_desc_parallel_and_single (line 88) | def test_get_desc_parallel_and_single(): function test_apply_transforms_single (line 97) | def test_apply_transforms_single(kg): function test_apply_transforms_list (line 106) | def test_apply_transforms_list(kg): function test_apply_transforms_parallel (line 116) | def test_apply_transforms_parallel(kg): function test_apply_transforms_invalid (line 127) | def test_apply_transforms_invalid(): FILE: tests/unit/test_executor.py function test_order_of_execution (line 11) | async def test_order_of_execution(batch_size): function test_executor_in_script (line 30) | async def test_executor_in_script(batch_size): function test_executor_with_running_loop (line 49) | async def test_executor_with_running_loop(batch_size): function test_executor_timings (line 69) | def test_executor_timings(): function test_executor_exception_handling (line 91) | def test_executor_exception_handling(): function test_executor_exception_raises (line 105) | def test_executor_exception_raises(): function test_executor_empty_jobs (line 117) | def test_executor_empty_jobs(): function test_executor_job_index_after_clear (line 123) | def test_executor_job_index_after_clear(): function test_executor_batch_size_edge_cases (line 137) | def test_executor_batch_size_edge_cases(): FILE: tests/unit/test_experiment.py class SampleDataRow (line 18) | class SampleDataRow(BaseModel): class ExperimentResultRow (line 24) | class ExperimentResultRow(BaseModel): function temp_dir (line 33) | def temp_dir(): function mock_git_repo (line 40) | def mock_git_repo(temp_dir): function sample_dataset (line 58) | def sample_dataset(): function experiment_backend (line 81) | def experiment_backend(): class TestExperiment (line 87) | class TestExperiment: method test_experiment_inheritance (line 90) | def test_experiment_inheritance(self): method test_experiment_creation (line 95) | def test_experiment_creation(self, experiment_backend): class TestVersionExperiment (line 108) | class TestVersionExperiment: method test_version_experiment_no_changes (line 111) | def test_version_experiment_no_changes(self, mock_git_repo): method test_version_experiment_with_changes (line 127) | def test_version_experiment_with_changes(self, mock_git_repo): method test_version_experiment_with_custom_message (line 146) | def test_version_experiment_with_custom_message(self, mock_git_repo): method test_version_experiment_stage_all (line 162) | def test_version_experiment_stage_all(self, mock_git_repo): method test_version_experiment_no_branch_creation (line 176) | def test_version_experiment_no_branch_creation(self, mock_git_repo): method test_find_git_root_error_handling (line 185) | def test_find_git_root_error_handling(self, temp_dir): method test_version_experiment_missing_gitpython (line 190) | def test_version_experiment_missing_gitpython(self, temp_dir): class TestExperimentDecorator (line 198) | class TestExperimentDecorator: method test_simple_async_experiment (line 202) | async def test_simple_async_experiment(self, sample_dataset, experimen... method test_experiment_arun (line 227) | async def test_experiment_arun(self, sample_dataset, experiment_backend): method test_experiment_with_name_prefix (line 251) | async def test_experiment_with_name_prefix( method test_experiment_with_custom_name (line 278) | async def test_experiment_with_custom_name( method test_sync_experiment_function (line 298) | def test_sync_experiment_function(self, experiment_backend): method test_experiment_error_handling (line 322) | async def test_experiment_error_handling(self, sample_dataset, experim... method test_experiment_with_no_model (line 347) | async def test_experiment_with_no_model(self, sample_dataset, experime... class TestMemorableNames (line 364) | class TestMemorableNames: method test_memorable_names_generation (line 367) | def test_memorable_names_generation(self): method test_unique_name_generation (line 376) | def test_unique_name_generation(self): method test_unique_names_batch_generation (line 386) | def test_unique_names_batch_generation(self): class TestUtilityFunctions (line 397) | class TestUtilityFunctions: method test_find_git_root_with_git_repo (line 400) | def test_find_git_root_with_git_repo(self, temp_dir): method test_find_git_root_current_dir (line 414) | def test_find_git_root_current_dir(self): method test_find_git_root_no_repo_error (line 425) | def test_find_git_root_no_repo_error(self, temp_dir): FILE: tests/unit/test_graph.py function test_knowledge_graph_save_with_problematic_chars (line 6) | def test_knowledge_graph_save_with_problematic_chars(tmp_path): class TestFindIndirectClusters (line 68) | class TestFindIndirectClusters: method assert_sets_equal (line 70) | def assert_sets_equal(self, list1, list2): method simple_graph (line 77) | def simple_graph(self): method test_with_depth_limit (line 189) | def test_with_depth_limit(self, simple_graph, depth_limit, expected_cl... method test_with_cycle (line 243) | def test_with_cycle(self, simple_graph): method test_bidirectional (line 247) | def test_bidirectional(self): method test_no_valid_paths (line 335) | def test_no_valid_paths(self): method test_relationship_condition (line 347) | def test_relationship_condition(self): method test_disconnected_components (line 396) | def test_disconnected_components(self): FILE: tests/unit/test_import.py function test_missing_haystack_llmwrapper (line 9) | def test_missing_haystack_llmwrapper(monkeypatch): function test_wrappers_with_missing_haystack (line 46) | def test_wrappers_with_missing_haystack(monkeypatch): function test_import_module (line 90) | def test_import_module(): function test_import_in_debug_mode (line 120) | def test_import_in_debug_mode(): FILE: tests/unit/test_instance_specific_rubrics_collections.py class MockInstructorLLM (line 14) | class MockInstructorLLM(InstructorBaseRagasLLM): method __init__ (line 17) | def __init__(self): method generate (line 21) | def generate(self, prompt, response_model): method agenerate (line 24) | async def agenerate(self, prompt, response_model): function mock_llm (line 29) | def mock_llm(): function sample_rubrics (line 35) | def sample_rubrics(): class TestInstanceSpecificRubricsCollections (line 46) | class TestInstanceSpecificRubricsCollections: method test_perfect_score (line 50) | async def test_perfect_score(self, mock_llm, sample_rubrics): method test_low_score (line 68) | async def test_low_score(self, mock_llm, sample_rubrics): method test_medium_score (line 85) | async def test_medium_score(self, mock_llm, sample_rubrics): method test_with_reference (line 102) | async def test_with_reference(self, mock_llm, sample_rubrics): method test_with_contexts (line 120) | async def test_with_contexts(self, mock_llm, sample_rubrics): method test_different_rubrics_per_sample (line 139) | async def test_different_rubrics_per_sample(self, mock_llm): method test_rubrics_required (line 189) | async def test_rubrics_required(self, mock_llm): method test_rubrics_in_prompt (line 201) | async def test_rubrics_in_prompt(self, mock_llm, sample_rubrics): method test_custom_name (line 221) | def test_custom_name(self, mock_llm): method test_default_name (line 226) | def test_default_name(self, mock_llm): method test_feedback_in_result_reason (line 232) | async def test_feedback_in_result_reason(self, mock_llm, sample_rubrics): method test_allowed_values_range (line 249) | def test_allowed_values_range(self, mock_llm): method test_minimal_inputs (line 255) | async def test_minimal_inputs(self, mock_llm, sample_rubrics): method test_custom_score_range_rubrics (line 271) | async def test_custom_score_range_rubrics(self, mock_llm): FILE: tests/unit/test_knowledge_graph_clusters.py class DebugUUID (line 11) | class DebugUUID(uuid.UUID): method __init__ (line 17) | def __init__(self, debug_name): method __str__ (line 22) | def __str__(self): method __repr__ (line 25) | def __repr__(self): method __setattr__ (line 28) | def __setattr__(self, name, value): function create_document_node (line 32) | def create_document_node(name: str) -> Node: function create_chunk_node (line 48) | def create_chunk_node(name: str) -> Node: function create_chain_of_similarities (line 63) | def create_chain_of_similarities( function create_chain_of_overlaps (line 115) | def create_chain_of_overlaps( function create_web_of_similarities (line 192) | def create_web_of_similarities( function create_document_and_child_nodes (line 234) | def create_document_and_child_nodes() -> t.Tuple[list[Node], list[Relati... function build_knowledge_graph (line 315) | def build_knowledge_graph( function assert_clusters_equal (line 355) | def assert_clusters_equal( function assert_n_clusters_with_varying_params (line 378) | def assert_n_clusters_with_varying_params( function test_find_indirect_clusters_with_document_and_children (line 403) | def test_find_indirect_clusters_with_document_and_children(): function test_find_n_indirect_clusters_with_document_and_children (line 421) | def test_find_n_indirect_clusters_with_document_and_children(): function test_find_indirect_clusters_with_similarity_relationships (line 443) | def test_find_indirect_clusters_with_similarity_relationships(): function test_find_n_indirect_clusters_with_similarity_relationships (line 460) | def test_find_n_indirect_clusters_with_similarity_relationships(): function test_find_indirect_clusters_with_overlap_relationships (line 520) | def test_find_indirect_clusters_with_overlap_relationships(): function test_find_n_indirect_clusters_with_overlap_relationships (line 537) | def test_find_n_indirect_clusters_with_overlap_relationships(): function test_find_n_indirect_clusters_handles_worst_case_grouping (line 596) | def test_find_n_indirect_clusters_handles_worst_case_grouping(): function test_find_indirect_clusters_with_condition (line 630) | def test_find_indirect_clusters_with_condition(): function test_find_n_indirect_clusters_with_condition (line 652) | def test_find_n_indirect_clusters_with_condition(): function test_find_indirect_clusters_with_cyclic_similarity_relationships (line 677) | def test_find_indirect_clusters_with_cyclic_similarity_relationships(): function test_find_n_indirect_clusters_with_cyclic_similarity_relationships (line 721) | def test_find_n_indirect_clusters_with_cyclic_similarity_relationships(): function test_find_indirect_clusters_with_web_graph (line 753) | def test_find_indirect_clusters_with_web_graph(): function test_find_n_indirect_clusters_with_web_graph (line 778) | def test_find_n_indirect_clusters_with_web_graph(): function test_performance_find_n_indirect_clusters_max_density (line 805) | def test_performance_find_n_indirect_clusters_max_density(): function constant_n_knowledge_graphs (line 886) | def constant_n_knowledge_graphs(): function test_performance_find_n_indirect_clusters_large_web_constant_n (line 899) | def test_performance_find_n_indirect_clusters_large_web_constant_n( function test_performance_find_n_indirect_clusters_independent_chains (line 981) | def test_performance_find_n_indirect_clusters_independent_chains(): FILE: tests/unit/test_knowledge_graph_save.py function test_knowledge_graph_save_with_problematic_chars (line 4) | def test_knowledge_graph_save_with_problematic_chars(tmp_path): FILE: tests/unit/test_langgraph.py function test_human_message_conversion (line 11) | def test_human_message_conversion(): function test_human_message_invalid_content (line 24) | def test_human_message_invalid_content(): function test_ai_message_conversion (line 35) | def test_ai_message_conversion(): function test_ai_message_with_tool_calls (line 48) | def test_ai_message_with_tool_calls(): function test_tool_message_conversion (line 85) | def test_tool_message_conversion(): function test_system_message_skipped (line 98) | def test_system_message_skipped(): function test_unsupported_message_type (line 108) | def test_unsupported_message_type(): function test_empty_message_list (line 124) | def test_empty_message_list(): function test_invalid_tool_calls_json (line 131) | def test_invalid_tool_calls_json(): FILE: tests/unit/test_llm_context.py function main (line 17) | def main(): FILE: tests/unit/test_metric.py function test_single_turn_metric (line 12) | def test_single_turn_metric(): function test_required_columns (line 32) | def test_required_columns(): function test_metrics_with_definition (line 99) | def test_metrics_with_definition(metric): function test_ignored_columns (line 115) | def test_ignored_columns(): function test_ignored_columns_validation (line 190) | def test_ignored_columns_validation(): class MetricResponseModel (line 248) | class MetricResponseModel(BaseModel): class CustomMetric (line 254) | class CustomMetric(LLMMetric): method __post_init__ (line 257) | def __post_init__(self): method get_correlation (line 261) | def get_correlation( function mock_llm (line 268) | def mock_llm(mock_llm): function test_metric_creation (line 273) | def test_metric_creation(): function test_metric_get_variables (line 281) | def test_metric_get_variables(): function test_metric_score_single (line 294) | def test_metric_score_single(mock_llm): function test_metric_async_score (line 312) | async def test_metric_async_score(mock_llm): function test_metric_response_model (line 328) | def test_metric_response_model(): function test_metric_prompt_conversion (line 335) | def test_metric_prompt_conversion(): FILE: tests/unit/test_metric_decorators.py class TestDiscreteMetric (line 17) | class TestDiscreteMetric: method test_discrete_metric_with_plain_string_return (line 20) | def test_discrete_metric_with_plain_string_return(self): method test_discrete_metric_with_plain_string_fail (line 34) | def test_discrete_metric_with_plain_string_fail(self): method test_discrete_metric_with_metric_result_return (line 47) | def test_discrete_metric_with_metric_result_return(self): method test_discrete_metric_validation_invalid_value (line 62) | def test_discrete_metric_validation_invalid_value(self): method test_discrete_metric_async_with_plain_return (line 76) | async def test_discrete_metric_async_with_plain_return(self): class TestNumericMetric (line 90) | class TestNumericMetric: method test_numeric_metric_with_plain_float_return (line 93) | def test_numeric_metric_with_plain_float_return(self): method test_numeric_metric_with_metric_result_return (line 107) | def test_numeric_metric_with_metric_result_return(self): method test_numeric_metric_validation_out_of_range (line 122) | def test_numeric_metric_validation_out_of_range(self): method test_numeric_metric_async_with_plain_return (line 136) | async def test_numeric_metric_async_with_plain_return(self): class TestRankingMetric (line 150) | class TestRankingMetric: method test_ranking_metric_with_plain_list_return (line 153) | def test_ranking_metric_with_plain_list_return(self): method test_ranking_metric_with_metric_result_return (line 173) | def test_ranking_metric_with_metric_result_return(self): method test_ranking_metric_validation_wrong_length (line 193) | def test_ranking_metric_validation_wrong_length(self): method test_ranking_metric_async_with_plain_return (line 207) | async def test_ranking_metric_async_with_plain_return(self): class TestDirectCallable (line 221) | class TestDirectCallable: method test_discrete_metric_direct_call_with_plain_return (line 224) | def test_discrete_metric_direct_call_with_plain_return(self): method test_discrete_metric_direct_call_with_metric_result_return (line 238) | def test_discrete_metric_direct_call_with_metric_result_return(self): method test_numeric_metric_direct_call (line 253) | def test_numeric_metric_direct_call(self): method test_ranking_metric_direct_call (line 265) | def test_ranking_metric_direct_call(self): method test_async_discrete_metric_direct_call (line 282) | async def test_async_discrete_metric_direct_call(self): method test_direct_call_vs_score_method (line 293) | def test_direct_call_vs_score_method(self): method test_direct_call_with_positional_args (line 310) | def test_direct_call_with_positional_args(self): method test_direct_call_handles_function_errors (line 321) | def test_direct_call_handles_function_errors(self): class TestEdgeCases (line 339) | class TestEdgeCases: method test_discrete_metric_with_custom_allowed_values (line 342) | def test_discrete_metric_with_custom_allowed_values(self): method test_numeric_metric_with_range_type (line 365) | def test_numeric_metric_with_range_type(self): method test_function_with_no_parameters (line 378) | def test_function_with_no_parameters(self): method test_function_with_exception (line 388) | def test_function_with_exception(self): class TestErrorHandling (line 406) | class TestErrorHandling: method test_positional_arguments_error (line 409) | def test_positional_arguments_error(self): method test_missing_required_arguments_error (line 425) | def test_missing_required_arguments_error(self): method test_missing_required_arguments_with_optional_arguments_error (line 440) | def test_missing_required_arguments_with_optional_arguments_error(self): method test_optional_type_annotation_without_default (line 459) | def test_optional_type_annotation_without_default(self): method test_mixed_required_optional_and_default_parameters (line 480) | def test_mixed_required_optional_and_default_parameters(self): method test_unknown_arguments_warning (line 520) | def test_unknown_arguments_warning(self): method test_mixed_error_scenarios (line 533) | def test_mixed_error_scenarios(self): method test_optional_parameters_work (line 544) | def test_optional_parameters_work(self): method test_async_error_handling (line 560) | async def test_async_error_handling(self): method test_pydantic_validation_error_format (line 575) | def test_pydantic_validation_error_format(self): method test_no_type_hints_still_works (line 592) | def test_no_type_hints_still_works(self): method test_comprehensive_type_validation (line 607) | def test_comprehensive_type_validation(self): class TestCustomTypeValidation (line 655) | class TestCustomTypeValidation: method test_custom_type_validation_should_work (line 658) | def test_custom_type_validation_should_work(self): method test_custom_type_validation_wrong_type_should_fail (line 696) | def test_custom_type_validation_wrong_type_should_fail(self): method test_mixed_standard_and_custom_types (line 719) | def test_mixed_standard_and_custom_types(self): method test_instructor_llm_like_usage (line 753) | def test_instructor_llm_like_usage(self): class TestIDESupport (line 801) | class TestIDESupport: method test_discrete_metric_has_proper_methods (line 804) | def test_discrete_metric_has_proper_methods(self): method test_numeric_metric_has_proper_methods (line 825) | def test_numeric_metric_has_proper_methods(self): method test_ranking_metric_has_proper_methods (line 846) | def test_ranking_metric_has_proper_methods(self): method test_protocol_attributes_accessible (line 867) | def test_protocol_attributes_accessible(self): FILE: tests/unit/test_multi_hop_query_synthesizer.py class MockConceptCombinationPrompt (line 23) | class MockConceptCombinationPrompt(PydanticPrompt): method generate (line 24) | async def generate(self, data: ConceptsList, llm, callbacks=None): class MockThemePersonaMatchingPrompt (line 30) | class MockThemePersonaMatchingPrompt(PydanticPrompt): method generate (line 31) | async def generate(self, data: ThemesPersonasInput, llm, callbacks=None): function _assert_scenario_properties (line 39) | def _assert_scenario_properties( function test_generate_scenarios (line 83) | async def test_generate_scenarios(fake_llm): FILE: tests/unit/test_multi_modal_faithfulness_collections.py class TestImageProcessingUtilities (line 19) | class TestImageProcessingUtilities: method test_is_image_path_or_url_with_http_url (line 22) | def test_is_image_path_or_url_with_http_url(self): method test_is_image_path_or_url_with_https_url (line 28) | def test_is_image_path_or_url_with_https_url(self): method test_is_image_path_or_url_with_local_path (line 33) | def test_is_image_path_or_url_with_local_path(self): method test_is_image_path_or_url_with_base64 (line 39) | def test_is_image_path_or_url_with_base64(self): method test_is_image_path_or_url_with_text (line 44) | def test_is_image_path_or_url_with_text(self): method test_is_image_path_or_url_with_none (line 50) | def test_is_image_path_or_url_with_none(self): method test_process_image_to_base64_with_valid_file (line 55) | def test_process_image_to_base64_with_valid_file(self): method test_process_image_to_base64_with_invalid_file (line 74) | def test_process_image_to_base64_with_invalid_file(self): method test_process_image_to_base64_with_text (line 79) | def test_process_image_to_base64_with_text(self): method test_process_image_to_base64_with_valid_base64 (line 84) | def test_process_image_to_base64_with_valid_base64(self): class TestBuildMultimodalMessageContent (line 100) | class TestBuildMultimodalMessageContent: method test_build_with_text_only (line 103) | def test_build_with_text_only(self): method test_build_with_mixed_content (line 116) | def test_build_with_mixed_content(self): method test_build_with_empty_contexts (line 140) | def test_build_with_empty_contexts(self): method test_content_contains_response (line 151) | def test_content_contains_response(self): class TestMultiModalFaithfulnessOutput (line 167) | class TestMultiModalFaithfulnessOutput: method test_output_faithful_true (line 170) | def test_output_faithful_true(self): method test_output_faithful_false (line 178) | def test_output_faithful_false(self): method test_output_default_reason (line 186) | def test_output_default_reason(self): class TestMultiModalFaithfulnessMetric (line 193) | class TestMultiModalFaithfulnessMetric: method test_input_validation_missing_response (line 197) | async def test_input_validation_missing_response(self): method test_input_validation_missing_contexts (line 221) | async def test_input_validation_missing_contexts(self): method test_metric_name_default (line 242) | def test_metric_name_default(self): FILE: tests/unit/test_multi_modal_relevance_collections.py class TestBuildMultimodalRelevanceMessageContent (line 16) | class TestBuildMultimodalRelevanceMessageContent: method test_build_with_text_only (line 19) | def test_build_with_text_only(self): method test_build_with_mixed_content (line 33) | def test_build_with_mixed_content(self): method test_build_with_empty_contexts (line 58) | def test_build_with_empty_contexts(self): method test_content_contains_user_input (line 70) | def test_content_contains_user_input(self): method test_content_contains_response (line 86) | def test_content_contains_response(self): method test_build_with_multiple_images (line 102) | def test_build_with_multiple_images(self): class TestMultiModalRelevanceOutput (line 127) | class TestMultiModalRelevanceOutput: method test_output_relevant_true (line 130) | def test_output_relevant_true(self): method test_output_relevant_false (line 138) | def test_output_relevant_false(self): method test_output_default_reason (line 146) | def test_output_default_reason(self): class TestMultiModalRelevanceMetric (line 153) | class TestMultiModalRelevanceMetric: method test_input_validation_missing_user_input (line 157) | async def test_input_validation_missing_user_input(self): method test_input_validation_missing_response (line 181) | async def test_input_validation_missing_response(self): method test_input_validation_missing_contexts (line 205) | async def test_input_validation_missing_contexts(self): method test_metric_name_default (line 227) | def test_metric_name_default(self): method test_instruction_content (line 244) | def test_instruction_content(self): FILE: tests/unit/test_oci_genai_wrapper.py class TestOCIGenAIWrapper (line 12) | class TestOCIGenAIWrapper: method mock_oci_client (line 16) | def mock_oci_client(self): method oci_wrapper (line 22) | def oci_wrapper(self, mock_oci_client): method test_initialization (line 30) | def test_initialization(self, mock_oci_client): method test_initialization_with_endpoint (line 42) | def test_initialization_with_endpoint(self, mock_oci_client): method test_convert_prompt_to_messages (line 53) | def test_convert_prompt_to_messages(self, oci_wrapper): method test_create_generation_request (line 62) | def test_create_generation_request(self, oci_wrapper): method test_create_generation_request_with_endpoint (line 78) | def test_create_generation_request_with_endpoint(self): method test_generate_text (line 92) | def test_generate_text(self, oci_wrapper, mock_oci_client): method test_generate_text_multiple_completions (line 111) | def test_generate_text_multiple_completions(self, oci_wrapper, mock_oc... method test_agenerate_text (line 127) | async def test_agenerate_text(self, oci_wrapper, mock_oci_client): method test_is_finished (line 143) | def test_is_finished(self, oci_wrapper): method test_repr (line 160) | def test_repr(self, oci_wrapper): method test_import_error (line 167) | def test_import_error(self): class TestOCIGenAIFactory (line 177) | class TestOCIGenAIFactory: method test_oci_genai_factory (line 181) | def test_oci_genai_factory(self, mock_wrapper_class): method test_oci_genai_factory_with_config (line 205) | def test_oci_genai_factory_with_config(self, mock_wrapper_class): FILE: tests/unit/test_optimizer_config.py function test_load_config (line 1) | def test_load_config(fake_llm, fake_embedding): FILE: tests/unit/test_prechunked_generation.py class MockLLM (line 11) | class MockLLM(BaseRagasLLM): method __init__ (line 12) | def __init__(self): method generate_text (line 15) | def generate_text(self, *args, **kwargs): method agenerate_text (line 18) | async def agenerate_text(self, *args, **kwargs): method is_finished (line 21) | def is_finished(self, response): class MockEmbeddings (line 25) | class MockEmbeddings(BaseRagasEmbeddings): method embed_documents (line 26) | def embed_documents(self, texts): method embed_query (line 29) | def embed_query(self, text): method aembed_documents (line 32) | async def aembed_documents(self, texts): method aembed_query (line 35) | async def aembed_query(self, text): function test_prechunked_transforms_has_no_splitter (line 39) | def test_prechunked_transforms_has_no_splitter(): function test_generate_with_chunks_creates_chunk_nodes (line 63) | def test_generate_with_chunks_creates_chunk_nodes(): function test_generate_with_chunks_accepts_strings (line 92) | def test_generate_with_chunks_accepts_strings(): function test_generate_with_chunks_filters_empty_content (line 118) | def test_generate_with_chunks_filters_empty_content(): function test_generate_with_chunks_handles_empty_sequence (line 149) | def test_generate_with_chunks_handles_empty_sequence(): FILE: tests/unit/test_prompt.py class EchoLLM (line 15) | class EchoLLM(BaseRagasLLM): method generate_text (line 16) | def generate_text( # type: ignore method agenerate_text (line 24) | async def agenerate_text( # type: ignore method is_finished (line 32) | def is_finished(self, response: LLMResult) -> bool: function test_string_prompt (line 37) | async def test_string_prompt(): function test_process_fields (line 52) | def test_process_fields(): function test_pydantic_prompt_io (line 79) | async def test_pydantic_prompt_io(): function test_pydantic_prompt_examples (line 94) | def test_pydantic_prompt_examples(): function test_prompt_hash (line 110) | def test_prompt_hash(): function test_prompt_hash_in_ragas (line 127) | def test_prompt_hash_in_ragas(fake_llm): function test_prompt_save_load (line 145) | def test_prompt_save_load(tmp_path): function test_prompt_save_load_language (line 165) | def test_prompt_save_load_language(tmp_path): function test_save_existing_prompt (line 186) | def test_save_existing_prompt(tmp_path): function test_prompt_class_attributes (line 196) | def test_prompt_class_attributes(): function test_prompt_parse_retry (line 215) | async def test_prompt_parse_retry(): function cosine_similarity (line 236) | def cosine_similarity(v1: t.List[float], v2: t.List[float]) -> float: function test_in_memory_example_store (line 246) | def test_in_memory_example_store(): FILE: tests/unit/test_quoted_spans_collections.py class TestQuotedSpansUtilities (line 13) | class TestQuotedSpansUtilities: method test_normalize_text_basic (line 16) | def test_normalize_text_basic(self): method test_normalize_text_multiline (line 20) | def test_normalize_text_multiline(self): method test_extract_quoted_spans_double_quotes (line 24) | def test_extract_quoted_spans_double_quotes(self): method test_extract_quoted_spans_single_quotes (line 32) | def test_extract_quoted_spans_single_quotes(self): method test_extract_quoted_spans_curly_quotes (line 38) | def test_extract_quoted_spans_curly_quotes(self): method test_extract_quoted_spans_min_len_filter (line 46) | def test_extract_quoted_spans_min_len_filter(self): method test_extract_quoted_spans_empty (line 53) | def test_extract_quoted_spans_empty(self): method test_extract_quoted_spans_multiple (line 59) | def test_extract_quoted_spans_multiple(self): method test_count_matched_spans_all_match (line 67) | def test_count_matched_spans_all_match(self): method test_count_matched_spans_none_match (line 75) | def test_count_matched_spans_none_match(self): method test_count_matched_spans_partial_match (line 83) | def test_count_matched_spans_partial_match(self): method test_count_matched_spans_case_sensitive (line 91) | def test_count_matched_spans_case_sensitive(self): method test_count_matched_spans_empty_spans (line 99) | def test_count_matched_spans_empty_spans(self): class TestQuotedSpansAlignmentCollections (line 106) | class TestQuotedSpansAlignmentCollections: method test_init_default_values (line 109) | def test_init_default_values(self): method test_init_custom_values (line 116) | def test_init_custom_values(self): method test_perfect_alignment (line 126) | async def test_perfect_alignment(self): method test_no_alignment (line 138) | async def test_no_alignment(self): method test_partial_alignment (line 152) | async def test_partial_alignment(self): method test_no_quotes_in_response (line 164) | async def test_no_quotes_in_response(self): method test_multiple_sources (line 176) | async def test_multiple_sources(self): method test_case_insensitive_matching (line 191) | async def test_case_insensitive_matching(self): method test_case_sensitive_matching (line 202) | async def test_case_sensitive_matching(self): method test_min_span_words_filter (line 213) | async def test_min_span_words_filter(self): method test_invalid_response_type (line 225) | async def test_invalid_response_type(self): method test_invalid_contexts_type (line 234) | async def test_invalid_contexts_type(self): method test_empty_contexts (line 245) | async def test_empty_contexts(self): method test_whitespace_normalization (line 255) | async def test_whitespace_normalization(self): method test_sync_score_method (line 265) | def test_sync_score_method(self): method test_curly_quotes (line 276) | async def test_curly_quotes(self): method test_backtick_quotes (line 287) | async def test_backtick_quotes(self): FILE: tests/unit/test_run_config.py function compare_rng (line 15) | def compare_rng() -> Callable[[Generator, Generator], bool]: function test_random_num_generator (line 41) | def test_random_num_generator( FILE: tests/unit/test_simple.py function test_import (line 6) | def test_import(): function test_type_casting (line 14) | def test_type_casting(): function test_import_metrics (line 18) | def test_import_metrics(): FILE: tests/unit/test_simple_llm_metric_persistence.py class TestSimpleLLMMetricPersistence (line 11) | class TestSimpleLLMMetricPersistence: method test_discrete_metric_save_and_load (line 14) | def test_discrete_metric_save_and_load(self): method test_numeric_metric_save_and_load (line 56) | def test_numeric_metric_save_and_load(self): method test_ranking_metric_save_and_load (line 85) | def test_ranking_metric_save_and_load(self): method test_save_load_with_prompt_object (line 114) | def test_save_load_with_prompt_object(self): method test_save_load_with_dynamic_few_shot_prompt (line 168) | def test_save_load_with_dynamic_few_shot_prompt(self): method test_save_with_default_path (line 240) | def test_save_with_default_path(self): method test_save_with_directory_path (line 268) | def test_save_with_directory_path(self): method test_save_with_no_extension (line 288) | def test_save_with_no_extension(self): FILE: tests/unit/test_single_hop_query_synthesizer.py class MockThemePersonaMatchingPrompt (line 14) | class MockThemePersonaMatchingPrompt(PydanticPrompt): method generate (line 15) | async def generate(self, data: ThemesPersonasInput, llm, callbacks=None): function test_extract_themes_from_items_with_strings (line 23) | def test_extract_themes_from_items_with_strings(fake_llm): function test_extract_themes_from_items_with_tuples (line 33) | def test_extract_themes_from_items_with_tuples(fake_llm): function test_extract_themes_from_items_with_mixed_formats (line 44) | def test_extract_themes_from_items_with_mixed_formats(fake_llm): function test_extract_themes_from_items_with_dict (line 54) | def test_extract_themes_from_items_with_dict(fake_llm): function test_extract_themes_from_items_empty_input (line 64) | def test_extract_themes_from_items_empty_input(fake_llm): function test_extract_themes_from_items_with_nested_empty_tuples (line 73) | def test_extract_themes_from_items_with_nested_empty_tuples(fake_llm): function test_generate_scenarios_with_tuple_entities (line 85) | async def test_generate_scenarios_with_tuple_entities(fake_llm): function test_generate_sample_includes_metadata (line 120) | async def test_generate_sample_includes_metadata(fake_llm): function test_generate_scenarios_with_string_entities (line 162) | async def test_generate_scenarios_with_string_entities(fake_llm): FILE: tests/unit/test_sql_semantic_equivalence_collections.py class MockInstructorLLM (line 12) | class MockInstructorLLM(InstructorBaseRagasLLM): method __init__ (line 15) | def __init__(self): method generate (line 19) | def generate(self, prompt, response_model): method agenerate (line 22) | async def agenerate(self, prompt, response_model): function mock_llm (line 27) | def mock_llm(): class TestSQLSemanticEquivalenceCollections (line 32) | class TestSQLSemanticEquivalenceCollections: method test_equivalent_queries_boolean_syntax (line 36) | async def test_equivalent_queries_boolean_syntax(self, mock_llm): method test_non_equivalent_queries_sum_vs_count (line 57) | async def test_non_equivalent_queries_sum_vs_count(self, mock_llm): method test_equivalent_queries_with_join (line 77) | async def test_equivalent_queries_with_join(self, mock_llm): method test_empty_reference_contexts (line 115) | async def test_empty_reference_contexts(self, mock_llm): method test_none_reference_contexts (line 133) | async def test_none_reference_contexts(self, mock_llm): method test_empty_response_raises_error (line 151) | async def test_empty_response_raises_error(self, mock_llm): method test_empty_reference_raises_error (line 162) | async def test_empty_reference_raises_error(self, mock_llm): method test_whitespace_only_response_raises_error (line 173) | async def test_whitespace_only_response_raises_error(self, mock_llm): method test_multiple_schema_contexts_joined (line 184) | async def test_multiple_schema_contexts_joined(self, mock_llm): method test_result_includes_explanations (line 209) | async def test_result_includes_explanations(self, mock_llm): method test_custom_metric_name (line 227) | async def test_custom_metric_name(self, mock_llm): method test_sync_score_method (line 233) | def test_sync_score_method(self, mock_llm): class TestSQLEquivalencePrompt (line 250) | class TestSQLEquivalencePrompt: method test_prompt_has_required_attributes (line 253) | def test_prompt_has_required_attributes(self): method test_prompt_to_string (line 267) | def test_prompt_to_string(self): method test_prompt_examples_cover_both_cases (line 287) | def test_prompt_examples_cover_both_cases(self): FILE: tests/unit/test_testset_schema.py function test_testset_to_evaluation_dataset (line 24) | def test_testset_to_evaluation_dataset(eval_sample): function test_testset_save_load_csv (line 34) | def test_testset_save_load_csv(tmpdir, eval_sample): function test_testset_save_load_jsonl (line 43) | def test_testset_save_load_jsonl(tmpdir, eval_sample): function test_testset_save_load_hf (line 54) | def test_testset_save_load_hf(tmpdir, eval_sample): FILE: tests/unit/test_tokenizers.py function test_tokenizer_import_without_network (line 8) | def test_tokenizer_import_without_network(monkeypatch): function test_default_tokenizer_encode_decode (line 22) | def test_default_tokenizer_encode_decode(): function test_get_default_tokenizer_singleton (line 33) | def test_get_default_tokenizer_singleton(): function test_default_tokenizer_with_dataclass (line 42) | def test_default_tokenizer_with_dataclass(): FILE: tests/unit/test_tool_call_accuracy.py function tool_call_accuracy (line 13) | def tool_call_accuracy(): function mock_callbacks (line 19) | def mock_callbacks(): class TestToolCallAccuracy (line 24) | class TestToolCallAccuracy: method test_is_sequence_aligned_perfect_match (line 27) | def test_is_sequence_aligned_perfect_match(self, tool_call_accuracy): method test_is_sequence_aligned_different_order (line 33) | def test_is_sequence_aligned_different_order(self, tool_call_accuracy): method test_is_sequence_aligned_different_length (line 39) | def test_is_sequence_aligned_different_length(self, tool_call_accuracy): method test_is_sequence_aligned_empty_sequences (line 45) | def test_is_sequence_aligned_empty_sequences(self, tool_call_accuracy): method test_perfect_match_scenario (line 50) | async def test_perfect_match_scenario(self, tool_call_accuracy, mock_c... method test_no_predicted_tool_calls (line 81) | async def test_no_predicted_tool_calls(self, tool_call_accuracy, mock_... method test_sequence_misalignment (line 95) | async def test_sequence_misalignment(self, tool_call_accuracy, mock_ca... method test_length_mismatch_more_predicted (line 121) | async def test_length_mismatch_more_predicted( method test_length_mismatch_fewer_predicted (line 148) | async def test_length_mismatch_fewer_predicted( method test_partial_argument_match (line 175) | async def test_partial_argument_match(self, tool_call_accuracy, mock_c... method test_wrong_tool_names (line 206) | async def test_wrong_tool_names(self, tool_call_accuracy, mock_callbac... method test_multiple_ai_messages (line 221) | async def test_multiple_ai_messages(self, tool_call_accuracy, mock_cal... method test_empty_reference_tool_calls (line 251) | async def test_empty_reference_tool_calls(self, tool_call_accuracy, mo... method test_empty_reference_with_predictions (line 262) | async def test_empty_reference_with_predictions( method test_metric_name (line 280) | def test_metric_name(self, tool_call_accuracy): method test_required_columns (line 284) | def test_required_columns(self, tool_call_accuracy): method test_strict_order_parameter_default (line 292) | def test_strict_order_parameter_default(self): method test_strict_order_parameter_explicit (line 297) | def test_strict_order_parameter_explicit(self): method test_is_sequence_aligned_flexible_mode (line 305) | def test_is_sequence_aligned_flexible_mode(self): method test_flexible_order_sorting_behavior (line 319) | def test_flexible_order_sorting_behavior(self): method test_sorted_key_for_tool_call (line 353) | def test_sorted_key_for_tool_call(self): FILE: tests/unit/test_tool_call_accuracy_collections.py function tool_call_accuracy (line 10) | def tool_call_accuracy(): class TestToolCallAccuracyCollections (line 15) | class TestToolCallAccuracyCollections: method test_perfect_match_scenario (line 19) | async def test_perfect_match_scenario(self, tool_call_accuracy): method test_no_predicted_tool_calls (line 38) | async def test_no_predicted_tool_calls(self, tool_call_accuracy): method test_sequence_misalignment_strict_order (line 55) | async def test_sequence_misalignment_strict_order(self, tool_call_accu... method test_flexible_order_mode (line 79) | async def test_flexible_order_mode(self): method test_partial_argument_match (line 105) | async def test_partial_argument_match(self, tool_call_accuracy): method test_both_empty (line 128) | async def test_both_empty(self, tool_call_accuracy): method test_length_mismatch (line 142) | async def test_length_mismatch(self, tool_call_accuracy): FILE: tests/unit/test_tool_call_f1.py function make_sample (line 10) | def make_sample(expected, predicted): function test_tool_call_f1_full_match (line 24) | async def test_tool_call_f1_full_match(): function test_tool_call_f1_partial_match (line 33) | async def test_tool_call_f1_partial_match(): function test_tool_call_f1_no_match (line 45) | async def test_tool_call_f1_no_match(): function test_tool_call_f1_extra_call (line 54) | async def test_tool_call_f1_extra_call(): FILE: tests/unit/test_tool_call_f1_collections.py function tool_call_f1 (line 10) | def tool_call_f1(): class TestToolCallF1Collections (line 15) | class TestToolCallF1Collections: method test_perfect_match (line 19) | async def test_perfect_match(self, tool_call_f1): method test_partial_match_missing_prediction (line 42) | async def test_partial_match_missing_prediction(self, tool_call_f1): method test_partial_match_extra_prediction (line 67) | async def test_partial_match_extra_prediction(self, tool_call_f1): method test_no_match (line 92) | async def test_no_match(self, tool_call_f1): method test_multiple_messages (line 114) | async def test_multiple_messages(self, tool_call_f1): method test_both_empty (line 142) | async def test_both_empty(self, tool_call_f1): method test_only_predicted_no_reference (line 157) | async def test_only_predicted_no_reference(self, tool_call_f1): method test_only_reference_no_predicted (line 177) | async def test_only_reference_no_predicted(self, tool_call_f1): method test_argument_mismatch (line 196) | async def test_argument_mismatch(self, tool_call_f1): method test_duplicate_tool_calls_in_prediction (line 220) | async def test_duplicate_tool_calls_in_prediction(self, tool_call_f1): method test_complex_scenario (line 245) | async def test_complex_scenario(self, tool_call_f1): method test_input_validation (line 274) | async def test_input_validation(self, tool_call_f1): method test_nested_dict_in_args (line 289) | async def test_nested_dict_in_args(self, tool_call_f1): method test_nested_list_in_args (line 324) | async def test_nested_list_in_args(self, tool_call_f1): method test_deeply_nested_args (line 359) | async def test_deeply_nested_args(self, tool_call_f1): FILE: tests/unit/test_traditional_relationship_builders.py function generate_test_sets (line 17) | def generate_test_sets( function validate_sets (line 152) | def validate_sets(sets: list[set[str]], min_similarity: float, similar_f... function jaccard_similarity_matrix (line 166) | def jaccard_similarity_matrix(sets: List[Set[str]]) -> np.ndarray: function jaccard_similarity_pair (line 181) | def jaccard_similarity_pair( function simple_kg (line 196) | def simple_kg(): function test__find_similar_embedding_pairs_jaccard (line 243) | def test__find_similar_embedding_pairs_jaccard(n_test_sets, max_len, thr... class TestJaccardSimilarityBuilder (line 273) | class TestJaccardSimilarityBuilder: method test_no_self_similarity_relationships (line 275) | async def test_no_self_similarity_relationships(self, simple_kg): method test_no_duplicate_relationships (line 284) | async def test_no_duplicate_relationships(self, simple_kg): method test_similarity_at_threshold (line 294) | async def test_similarity_at_threshold(self): method test_all_below_threshold (line 303) | async def test_all_below_threshold(self): method test_all_above_threshold (line 314) | async def test_all_above_threshold(self): method test_malformed_entities_raises (line 324) | async def test_malformed_entities_raises(self): method test_jaccard_similarity_builder_empty_graph (line 333) | async def test_jaccard_similarity_builder_empty_graph(self): method test_jaccard_similarity_builder_basic (line 340) | async def test_jaccard_similarity_builder_basic(self, simple_kg): method test_jaccard_similarity_builder_no_entities (line 359) | async def test_jaccard_similarity_builder_no_entities(self): method test_apply_transforms_cosine_similarity_builder (line 371) | async def test_apply_transforms_cosine_similarity_builder(self, simple... FILE: tests/unit/test_utils.py function test_check_if_sum_is_close (line 27) | def test_check_if_sum_is_close(values, close_to, num_places): function test_get_from_dict (line 49) | def test_get_from_dict(data_dict, key, expected): function test_camel_to_snake (line 61) | def test_camel_to_snake(camel_case_string, expected): class TestBatched (line 67) | class TestBatched: method test_batched (line 79) | def test_batched(self, iterable, n: int, expected): method test_batched_invalid_n (line 83) | def test_batched_invalid_n(self): method test_batched_output_type (line 96) | def test_batched_output_type(self, iterable, n, expected_type: type): class TestCreateNanoId (line 103) | class TestCreateNanoId: method test_create_nano_id_default_size (line 106) | def test_create_nano_id_default_size(self): method test_create_nano_id_custom_size (line 112) | def test_create_nano_id_custom_size(self): method test_create_nano_id_uniqueness (line 119) | def test_create_nano_id_uniqueness(self): method test_create_nano_id_alphanumeric (line 127) | def test_create_nano_id_alphanumeric(self): class TestAsyncToSync (line 134) | class TestAsyncToSync: method test_async_to_sync_basic (line 137) | def test_async_to_sync_basic(self): method test_async_to_sync_with_kwargs (line 148) | def test_async_to_sync_with_kwargs(self): method test_async_to_sync_exception_handling (line 159) | def test_async_to_sync_exception_handling(self): method test_async_to_sync_return_types (line 170) | def test_async_to_sync_return_types(self): class TestGetTestDirectory (line 183) | class TestGetTestDirectory: method test_get_test_directory_exists (line 186) | def test_get_test_directory_exists(self): method test_get_test_directory_in_temp (line 192) | def test_get_test_directory_in_temp(self): method test_get_test_directory_unique (line 198) | def test_get_test_directory_unique(self): method test_get_test_directory_naming_pattern (line 206) | def test_get_test_directory_naming_pattern(self): method test_get_test_directory_writable (line 215) | def test_get_test_directory_writable(self): FILE: tests/unit/test_uvloop_compatibility.py class TestUvloopCompatibility (line 9) | class TestUvloopCompatibility: method test_apply_nest_asyncio_with_uvloop_returns_false (line 13) | def test_apply_nest_asyncio_with_uvloop_returns_false(self): method test_run_with_uvloop_and_running_loop (line 31) | def test_run_with_uvloop_and_running_loop(self): method test_run_async_tasks_with_uvloop (line 51) | def test_run_async_tasks_with_uvloop(self): method test_apply_nest_asyncio_without_uvloop_returns_true (line 69) | def test_apply_nest_asyncio_without_uvloop_returns_true(self): method test_run_with_standard_asyncio_and_running_loop (line 80) | def test_run_with_standard_asyncio_and_running_loop(self): FILE: tests/unit/test_validation.py function test_validate_required_columns (line 24) | def test_validate_required_columns(): function test_valid_data_type (line 49) | def test_valid_data_type(): function test_column_remap (line 79) | def test_column_remap(column_map): function test_column_remap_omit (line 101) | def test_column_remap_omit(): FILE: tests/utils/llm_setup.py function check_api_key (line 12) | def check_api_key(provider: str = "openai") -> bool: function create_legacy_llm (line 43) | def create_legacy_llm(model: str = "gpt-3.5-turbo", **kwargs): function create_modern_llm (line 72) | def create_modern_llm( function create_legacy_embeddings (line 111) | def create_legacy_embeddings(model: str = "text-embedding-ada-002", **kw... function create_modern_embeddings (line 137) | def create_modern_embeddings( function create_legacy_llm_with_langchain (line 188) | def create_legacy_llm_with_langchain(model: str = "gpt-4o-mini", **kwargs): function create_legacy_embeddings_with_langchain (line 211) | def create_legacy_embeddings_with_langchain( FILE: tests/utils/metric_comparison.py class MetricDiffResult (line 19) | class MetricDiffResult: method to_dataframe (line 48) | def to_dataframe(self) -> pd.DataFrame: method print_summary (line 63) | def print_summary(self): function run_metric_on_dataset (line 87) | async def run_metric_on_dataset( function compare_metrics (line 151) | async def compare_metrics( function run_metric_on_dataset_with_batching (line 234) | async def run_metric_on_dataset_with_batching( function export_comparison_results (line 304) | def export_comparison_results(