autorag.data.qa.evolve package

Submodules

autorag.data.qa.evolve.llama_index_query_evolve module

async autorag.data.qa.evolve.llama_index_query_evolve.compress_ragas(row: Dict, llm: BaseLLM, lang: str = 'en') Dict[source]
async autorag.data.qa.evolve.llama_index_query_evolve.conditional_evolve_ragas(row: Dict, llm: BaseLLM, lang: str = 'en') Dict[source]
async autorag.data.qa.evolve.llama_index_query_evolve.llama_index_generate_base(row: Dict, llm: BaseLLM, messages: List[ChatMessage]) Dict[source]
async autorag.data.qa.evolve.llama_index_query_evolve.reasoning_evolve_ragas(row: Dict, llm: BaseLLM, lang: str = 'en') Dict[source]

autorag.data.qa.evolve.openai_query_evolve module

class autorag.data.qa.evolve.openai_query_evolve.Response(*, evolved_query: str)[source]

Bases: BaseModel

evolved_query: str
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'evolved_query': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

async autorag.data.qa.evolve.openai_query_evolve.compress_ragas(row: Dict, client: AsyncOpenAI, model_name: str = 'gpt-4o-2024-08-06', lang: str = 'en') Dict[source]
async autorag.data.qa.evolve.openai_query_evolve.conditional_evolve_ragas(row: Dict, client: AsyncOpenAI, model_name: str = 'gpt-4o-2024-08-06', lang: str = 'en') Dict[source]
async autorag.data.qa.evolve.openai_query_evolve.query_evolve_openai_base(row: Dict, client: AsyncOpenAI, messages: List[ChatMessage], model_name: str = 'gpt-4o-2024-08-06')[source]

Evolve the original query to a new evolved query using OpenAI structured outputs.

async autorag.data.qa.evolve.openai_query_evolve.reasoning_evolve_ragas(row: Dict, client: AsyncOpenAI, model_name: str = 'gpt-4o-2024-08-06', lang: str = 'en') Dict[source]

autorag.data.qa.evolve.prompt module

Module contents