Claude Ask

A provider-specific guide to the Claude Ask action for accessing Anthropic's language models.

The Claude Ask Action gives you direct access to Anthropic's family of Claude language models. Claude models are known for their large context windows, sophisticated reasoning, and a strong focus on safety and reliability, making them excellent choices for complex document analysis and enterprise use cases.

This guide covers specifics for the Claude action. For a general overview of how to work with Large Language Models, including prompting techniques, temperature, and other settings, please see our main **[LLM Action Guide](./llm.md)**.

Connection Setup

You will need an Anthropic account and your API key.

  1. Sign up for an account on the Anthropic Console.

  2. Find your API key in your account settings under API Keys.

  3. In AgenticFlow, navigate to Settings > Connections and add a new Anthropic (Claude) Connection, providing your API key.

Configuration

Input Parameters

Parameter
Type
Description

Connection

Connection

Select the Anthropic connection you created.

Model

Select

Choose the specific Claude model you want to use (e.g., claude-3-opus-20240229, claude-3-sonnet-20240229).

System Prompt

Text

Instructions for the AI's persona or role. Claude models respond very well to clear, detailed system prompts.

User Prompt

Text

The main instruction or question for the AI model.

Temperature

Number

Controls randomness. See the main LLM guide for details.

Max Tokens

Number

The maximum length of the generated response.

Output Parameters

Parameter
Type
Description

Output

Text

The text generated by the Claude model.

Example: Summarizing a Long Document

Claude's large context window makes it ideal for working with very long texts, such as research papers, legal documents, or financial reports.

  1. Get the Document: Start with an action that provides a large block of text, such as a Web Scraping Action that has extracted the full text of a long article, or a File Input Action with an uploaded PDF.

  2. Configure the Claude Ask Action:

    • Connection: Select your Anthropic connection.

    • Model: claude-3-haiku-20240307 (for speed on long documents).

    • System Prompt: You are an expert research analyst. Your task is to read the provided document and produce a concise, easy-to-understand summary.

    • User Prompt: Please summarize the key findings and conclusions of the following document: {{web_scraping_action.text}}

This workflow leverages Claude's specific strengths to tackle a task that might be difficult for models with smaller context windows.

Last updated

Was this helpful?