Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AISI Inspect integration #6

Merged
merged 7 commits into from
Jul 5, 2024
Merged

AISI Inspect integration #6

merged 7 commits into from
Jul 5, 2024

Conversation

jacobthebanana
Copy link
Collaborator

@jacobthebanana jacobthebanana commented Jun 24, 2024

PR Type

Feature

Short Description

Integrate AISI Inspect for RAG and for RAGAS Evaluation.

To run these examples, install inspect-ai and run:

cd veval/
inspect eval run_inspect_rag_solver.py

…use.

Fixed embedding dimensionality mismatch by specifying embed model name.
@jacobthebanana jacobthebanana changed the base branch from main to develop June 24, 2024 22:13
@@ -102,3 +111,70 @@ def get_cfg(self):
if self._cfg is None:
raise ValueError("System config not set.")
return self._cfg.as_dict()

def get_inspect_tool(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of implementing both the get_inspect_tool and the get_inspect_solver. Do we need both, or just one of these is sufficient?

async def solve(state: TaskState, generate: Generate) -> TaskState:
query = state.user_prompt.text
async with concurrency("document_search", max_concurrency):
response = self.invoke(query, documents)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The response here consists of both the retrieved context and the generated answer, why are we passing it again through the chain_of_thought(), generate() and self_critique() pipeline?

metric_function=inspect_metric_fn,
)()
for ragas_feature_name in RAGAS_FEATURE_NAMES
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current implementation calculates all available metrics irrespective of task. Modify this to restrict to only those metrics which are specified in the task config (yaml file).

@xeon27 xeon27 marked this pull request as ready for review July 5, 2024 16:31
@xeon27 xeon27 merged commit 032ed7f into develop Jul 5, 2024
@xeon27 xeon27 deleted the aisi-inspect-integration branch July 5, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants