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

feat: onboard conversational agent to test framework #13

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/tests/conversational_agent/conversational_agent.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import path from 'path';
import { ApiProviderFactory } from '../../providers/factory';
import { QARunner } from '../../runners/qa/qa_runner';

const provider = ApiProviderFactory.create();
const runner = new QARunner(provider);
const specDirectory = path.join(__dirname, 'specs');
const specFiles = [path.join(specDirectory, 'conversational_agent_eval.jsonl')];

runner.run(specFiles);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{"id": "catIndexTool-1","clusterStateId":"none","question":"What are the indices in my cluster?","expectedAnswer": "The indices in your cluster include logs, metrics, alerts and other application data. Some examples are security logs, nginx logs, jaeger traces, audit logs and sample datasets."}
{"id": "visualizationTool-1", "clusterStateId": "none", "question": "help me find the visualization with name `sales`?", "expectedAnswer": "The visualization with name 'sales' has an ID of '37cc8650-b882-11e8-a6d9-e546fe2bba5f' based on the information provided."}
{"id": "pplTool-1", "clusterStateId": "none", "question": "could you use TransferQuestionToPPLAndExecuteTool to check if there is any error log in opensearch_dashboards_sample_data_logs index?", "expectedAnswer": "Based on the information obtained from examining the logs index, there do not appear to be any logs containing the term 'error'."}