04.6.4.1 AI Anthropic Claude 3
Node Description
AI Anthropic Claude 3 - action type node, which is an alternative to ChatGPT and is necessary for generating responses to almost any user request.
AI Anthropic Claude 3 is a powerful language model with a wide range of applications:
- Communication and human interaction: the model can be used to communicate naturally with people, help them solve tasks, provide information and recommendations.
- Text generation: the model can generate coherent and meaningful texts on topics ranging from articles and essays to scenarios.
- Natural Language Processing: the model can analyze and understand natural language, performing tasks such as classifying text, answering questions, translating, etc.
- Intelligent assistance: the model can assist with a variety of tasks ranging from scientific research and business intelligence to creative writing and personal organization.
- Application development: developers can integrate the model into their applications to provide better user interaction.
Node Configuration
To configure the AI Anthropic Claude 3 node, required and optional fields must be filled in. The required fields include:
- Model;
- Max Tokens;
- User Prompt/Image Path (at least one of the two fields must be filled in).
Model
A drop-down list to select the AI model to process the request. There are three types of model:
Claude 3 Opus is the most intelligent model with the best performance for very complex tasks. Characterized by fluency and human understanding. Possible uses:
- Task automation: planning and executing complex actions using APIs and databases, interactive coding;
- Research and development: research review, brainstorming and hypothesis generation, drug discovery;
- Strategy: advanced analysis of charts, financials and market trends, forecasting.
Claude 3 Sonnet - provides a balance between intelligence and speed, especially for enterprise workloads. It has high performance at a lower cost than its counterparts. Possible use cases:
- Data processing: RAG or search and retrieval of huge amounts of knowledge;
- Sales: product recommendations, forecasting, targeted marketing;
- Time-saving tasks: code generation, quality control, parsing text from images.
Claude 3 Haiku is the fastest and most compact model, providing near-instantaneous response. It responds to simple queries with unrivaled speed. Possible uses:
- Customer interaction: fast and accurate support for live interactions, translations;
- Content moderation: identifying risky behavior or customer requests;
- Cost reduction tasks: optimized logistics, inventory management, knowledge extraction from unstructured data.
A detailed model comparison is available to view here.
Dialogue History
Field for inserting a JSON object displaying the history of previous interaction with AI. The history can be used by AI to generate a response in the required format and get additional information.
[
{"role": "user", "content": "Hello there."},
{"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"},
{"role": "user", "content": "What are the distinguishing characteristics of the season Winter?"},
]
User Prompt
A field to enter the text of the request.
Image Path
A field for entering file content in the format 1.body.files.[0].content
.
Content is one of the output parameters of nodes that work with files. A file can also be transferred to the Trigger on Webhook node address.
System Prompt
A field to enter a system prompt for AI. The hint instructions will be used when generating a response to the prompt.
Max Tokens
The maximum number of response tokens that can be generated by AI before stopping. Models can stop before reaching this maximum. This parameter sets only the absolute maximum number of tokens that can be generated.
Temperature (Number)
A field for entering a number. The degree of randomness, arbitrariness, that is allowed in the AI response.
The default is 1.0
. Varies from 0. 0
to 1.0
. Use a temperature closer to 0. 0
for analytical / multiple choice tasks and closer to 1.0
for creative and generative tasks. Even at a temperature of 0.0
, the results will not be completely deterministic.
Stop Generation
A field to enter text that will cause AI to stop generating a response.
Example of launching a node
Let's run the AI Anthropic Claude 3 node to process the text and generate a response with parameters:
- User Prompt - What are the most popular pets?
- Model - Haiku;
- Max Tokens - 1024;
- Temperature (Number) - 0.0.
The output of the node execution is JSON:
- with the response to the request
"content";
- with system fields, such as model name
"model",
number of incoming "input_tokens
" and outgoingtokens "output_tokens
", message identifier "id"
, reason for stopping generation of response text"stop_reason
".
JSON
{
"result": {
"content": [
{
"text": "Here are some of the most popular pet types in many parts of the world:\n\n1. Dogs - Dogs are one of the most popular pets globally. They come in many breeds and sizes and are known for their loyalty and companionship.\n\n2. Cats - Cats are also extremely popular household pets. They are relatively low-maintenance, independent, and make great indoor companions.\n\n3. Fish - Aquarium fish, such as goldfish, bettas, and tropical fish, are very common pets, especially for those with limited space.\n\n4. Rabbits - Rabbits are growing in popularity as pets, especially for families. They are social, cute, and can be kept indoors.\n\n5. Hamsters - Small rodents like hamsters, gerbils, and guinea pigs are classic starter pets, especially for children.\n\n6. Birds - Birds like parrots, cockatiels, and parakeets are popular for their intelligence and ability to interact with their owners.\n\n7. Reptiles - Reptiles like lizards, snakes, and turtles have become more mainstream as pets in recent years.\n\nThe most popular pets tend to be those that are relatively easy to care for, don't require a lot of space, and can provide companionship. But preferences can vary greatly by region and culture.",
"type": "text"
}
],
"id": "msg_01HedkH3Gnh8XdZ8ZeAofBLB",
"model": "claude-3-haiku-20240307",
"role": "assistant",
"stop_reason": "end_turn",
"stop_sequence": null,
"type": "message",
"usage": {
"input_tokens": 14,
"output_tokens": 286
}
}
}