What is an Anthropic node?

Node in Stack AI

The Anthropic node allows you to integrate Anthropic’s large language models (LLMs) into your workflows.

The models available from Anthropic are the following ones:

  • Claude 3 Opus: most capable model, has a context window of 200,000 tokens. The performance of this model is comparable to GPT-4o.
  • Claude 3 Sonnet: second most capable model, has a context windown of 200,000 tokens. Comparable with GPT-4.
  • Claude 3 Haiku: fastest model, good balance between speed and cost. Comparable to GPT-3.5 turbo.

How to use it?

Connections to an Anthropic node

To utilize the Anthropic node, you must establish the following connections:

  • Input: This node necessitates a text input. Typically, you would connect the input to an Input node (e.g., message from a user), or to another LLM node (generating a text for this new LLM).
  • Output: This node outputs the response from the LLM.

Formatted prompt of an Anthropic node

On the OpenAI node, you will find different field boxes and parameters.

  • System: This field box is where you especify how you’d like the LLM to respond (e.g., tone, style, language, etc.). Typically, you’d especify things that won’t change throughout the conversation with the user.
  • Prompt: This field box is where you especify where the question from the user is coming from, what context to consider, etc. Connected inputs will pop up as labels below the prompt. A warning will appear if you haven’t specify each input in the prompt. You include inputs by using curly brackets (e.g., {in-0}).
  • Formatted prompt: In this field, you will see once you play run, the prompt that is sent via API to OpenAI. You will see all inputs substituted by text values (e.g., question from user, chunks of information from your knowledge bases, etc.).
  • Token: On the bottom right corner, you will see a count of the tokens used in the prompt. This is important because OpenAI charges per token.
  • Latency: Additionally, on the bottom right corner, you will see the latency of the node: how much time it took to run it.