Skip to content

[Help Needed] Testing with Claude API Key #8

@priyanshus

Description

@priyanshus

Wanted to check if we can configure the API key and provider details for Anthropic directly in evaliphy.config.ts and verify that evaluations work with Anthropic models.

I’m trying something like this:

evaluate.use({
  llmAsJudgeConfig: {
    model: "claude-3.5-sonnet",
    provider: {
      type: "anthropic",
      apiKey: process.env.ANTHROPIC_KEY,
    },
    temperature: 0,
  },
  timeout: 15000,
});

evaluate(
  "RAG /api/chat: return policy answer is faithful",
  async ({ httpClient }) => {
    const query = "What is your return policy?";
    const res = await httpClient.post("/api/chat", { message: query });
    const data = await res.json<ChatResponse>();

    await expect({
      query,
      response: data.answer,
      context: data.context,
    }).toBeFaithful({ threshold: 0.8 });
  }
);

Just want to ensure Evaliphy supports direct integration with LLM provider APIs like Anthropic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions