Alpine Agent: An AI Agent to Navigate Your Winter Mountain Adventures
As we step into 2025, LLM Agents are having their moment, with Mark Zuckerberg even suggesting that AI engineers might soon take over traditional coding jobs at Meta. Numerous frameworks are emerging to simplify the development of AI agent applications, while the competition among agentic systems intensifies on benchmarks, each vying to be the first to achieve AGI.
But what exactly are LLM Agents? My colleague Aymeric Roucher offers a wonderfully simple definition in his intro to AI agents:
AI Agents are programs where LLM outputs control the workflow.
What kinds of workflows can these agents handle? While agents excel in benchmarks, these tests often fall short of representing real-world applications. The practical use cases we encounter today, such as agentic RAG systems or self-correcting text-to-SQL, are undoubtedly useful—but they often feel somewhat uninspiring to me.
Instead, I find myself wondering: what kinds of applications could I develop that would genuinely enhance my daily life? As a sports and outdoor enthusiast, I’ve always dreamed of something that could automate the preparatory research for a mountain trip and streamlining the planning process so I can focus entirely on the adventure itself.
That’s what led me to create Alpine Agent, a simple Gradio app powered by Hugging Face's latest library, smolagents. This application is tailored to help plan safe ski touring itineraries in the French Alps and Pyrenees. It relies on data and APIs from skitour.fr and the French weather forecast agency Météo France.
If you’re passionate about the outdoors and ski touring, I’d love for you to test the app and share your feedback. Even if your main interest is in building agents, give the app a try and follow along with this blog post to learn how it was created.
Plan a safe ski touring trip using Skitour.fr and Météo France
Usually, when it comes to planning a safe ski touring trip in the French Alps or Pyrenees, combining Skitour.fr’s detailed route data with Météo-France’s reliable weather and avalanche forecasts is essential for embarking on your adventure with peace of mind.
1. What is skitour?
Skitour.fr is a French website dedicated to ski touring enthusiasts, offering a comprehensive platform for planning, sharing, and discussing ski touring routes, conditions, and experiences. The site provides detailed route descriptions, user-generated trip reports, equipment guides, and a community forum for discussions.To facilitate integration with other applications, Skitour.fr offers an API that allows developers to access its database of routes and trip reports. The API is available at skitour.fr/api
2. What is Météo France?
Météo-France is the official French meteorological service, responsible for observing, studying, and forecasting weather conditions across France and its territories. In addition to providing detailed forecasts for mountainous areas, Météo-France offers the Bulletin d'Estimation du Risque d'Avalanche (BERA), or Avalanche Risk Estimation Bulletin, as one of its key services. These bulletins deliver comprehensive evaluations of snow and avalanche conditions, supporting outdoor enthusiasts, local authorities, and safety teams in making well-informed decisions. The BERA includes critical details about snowpack stability, potential avalanche triggers, and the likelihood of both natural and human-induced avalanches. It also assigns a risk level ranging from 1 (low) to 5 (very high) and highlights specific altitudes and slope orientations at the highest risk. This data is also accessible through an API portal, available at portail-api.meteofrance.fr, enabling developers to integrate it into their own applications or tools.
Analyzing this data thoroughly and making informed decisions based on it is crucial for ensuring safety during ski touring trips. It can be a time process, especially when considering multiple factors such as snowpack stability, avalanche risks, weather forecasts, and the suitability of specific routes. This is where an LLM can streamline the planning process, simplifying the task by quickly processing and integrating complex data to provide actionable recommendations. Let's build an LLM agent based on this data!
Building Alpine Agent
Using the smolagents library, I've developed a system capable of answering user queries such as Can you suggest a ski touring itinerary near Chamonix, of moderate difficulty, with good weather and safe avalanche conditions? The system autonomously determines the necessary workflow, retrieving data from Skitour and/or Météo-France to provide the most accurate and helpful response possible.
In smolagents, there is first-class support for Code Agents, which are agents that execute their actions through code. Numerous research studies have demonstrated that using code to enable tool-calling in LLMs significantly improves performance.Check out the smolagents documentation for a detailed overview.
To build such an agent, you need at least two elements:
tools
: a list of tools the agent has access to, those tools will wrap skitour and Météo France API routesmodel
: an LLM that will be the engine of your agent.
1. The LLM engine
For the model, you can use any LLM, either open models using smolagents' HfApiModel
class, that leverages Hugging Face's free inference API, or you can use LiteLLMModel
to leverage litellm and pick from a list of 100+ different cloud LLMs.
I suggest focusing on models with strong reasoning capabilities, as errors in agentic workflows can arise from genuine mistakes or from the LLM engine's limitations in reasoning effectively. Through testing, I found that Qwen/Qwen2.5-Coder-32B-Instruct, meta-llama/Llama-3.3-70B-Instruct, and openai-gpt4o are excellent candidates for powering Alpine Agent.
Instantiating the engine:
from smolagents import HfApiModel, LiteLLMModel
def create_llm_engine(type_engine: str, api_key: str = None):
if type_engine == "Qwen/Qwen2.5-Coder-32B-Instruct":
llm_engine = HfApiModel(model_id=os.environ["HUGGINGFACE_ENDPOINT_ID_QWEN"])
return llm_engine
elif type_engine == "meta-llama/Llama-3.3-70B-Instruct":
llm_engine = HfApiModel(model_id=os.environ["HUGGINGFACE_ENDPOINT_ID_LLAMA"])
return llm_engine
elif type_engine == "openai/gpt-4o" and api_key:
llm_engine = LiteLLMModel(model_id="openai/gpt-4o", api_key=api_key)
return llm_engine
elif type_engine == "openai/gpt-4o" and not api_key:
raise ValueError("You need to provide an API key to use the the model engine.")
else:
raise ValueError("Invalid engine type. Please choose either 'openai/gpt-4o' or 'Qwen/Qwen2.5-Coder-32B-Instruct'.")
2. Defining tools
For a complete ski touring guide I've defined the following routes that wraps skitour and Météo France API routes:
list_mountain_ranges
: Searches for the ID(s) of the mountain ranges closest to a given location stated by the user. It wrapsGET/api/massifs
from skitour APIlist_routes
: Looks for a list of ski touring routes in a given list of mountain ranges. It wrapsGET/api/topos
from skitour APIdescribe_route
: Searches for key information about a specific ski touring route, including weather forecasts and associated avalanche risks. It wrapsGET/api/topos
from skitour API,GET/massif/BRA
from Meteo France API and meteofrance-api package.forecast
: Searches for the weather forecast for a given location as well as the current avalanche risk estimation bulletin. It wrapsGET/massif/BRA
from Meteo France API and meteofrance-api package.recent_outings
: Searches for recent outings published by skitour community users in a given mountain range.It wrapsGET/api/sorties
from [skitour API](https://skitour.fr/api
Let's zoom at the implementation of one of these tools like describe_route
. First we need to define some utils funtions to interact with the API:
import os
import requests
import xml.etree.ElementTree as ET
from typing import List, Dict, Union
from meteofrance_api import MeteoFranceClient
METEOFRANCE_API_URL = 'https://public-api.meteofrance.fr/public/DPBRA/v1/'
SKITOUR_API_URL = 'https://skitour.fr/api/'
def get_details_route(id_route) -> :
"""
Fetch the details of a specific route from skitour API
Args:
id_route (str): ID of the route.
Returns:
Dict: Details of the route.
"""
url = SKITOUR_API_URL + f'topo/{id_route}'
headers = {'cle': os.getenv('SKITOUR_API_TOKEN')}
response = requests.get(url, headers=headers)
return response.json()
def extract_text(element: ET.Element) -> str:
"""
Extract all text from an XML element recursively.
Args:
element (ET.Element): XML element.
Returns:
str: Extracted text.
"""
texte = element.text or ""
for enfant in element:
texte += extract_text(enfant)
texte += element.tail or ""
return texte
def get_massif_conditions(massif_id: str) -> str:
"""
Fetch the weather conditions for a given mountain range.
Args:
range_id (str): ID of the mountain range.
Returns:
str: Weather conditions in plain text.
"""
url = METEOFRANCE_API_URL + 'massif/BRA'
headers = {'apikey': METEO_FRANCE_TOKEN, 'accept': '*/*'}
params = {'id-massif': massif_id, "format": "xml"}
response = requests.get(url, headers=headers, params=params)
xml_text = response.text
root = ET.fromstring(xml_text)
text = extract_text(root)
#remove file names
text = re.sub(r'\b[\w\-]+\.[a-zA-Z0-9]+\b', '', text).strip()
return text
def llm_summarizer(text: str, llm_engine: Union[HfApiModel, LiteLLMModel]) -> str:
"""
Summarize a text using a language model.
Args:
text (str): The input text to summarize.
llm_engine (Union[HfApiModel, LiteLLMModel]): The language model to use.
Returns:
str: The summarized text.
"""
messages=[
{
"role": "system",
"content": """You're an expert at summarizing data on weather forecast and avalanche conditions.
Summarize the data that's been provided to you below
"""
},
{
"role": "user",
"content": text,
}
]
summary = llm_engine(messages)
return summary["content"]
For example Let's look at the output from the get_details_route
function:
info_route = get_details_route(2)
print(info_route)
{'id': '2',
'nom': 'Col de la Balmette, Versant Est',
'orientation': 'E',
'denivele': '1670',
'dif_ski': '3.1',
'expo': '1',
'difficulte': 'R',
'gpx': '/topos/gpx/2.gpx',
'massif': {'id': '12', 'nom': 'Belledonne'},
'depart': {'id': '2',
'nom': 'Articol',
'altitude': '1005',
'acces': "Depuis Grenoble, prendre la route de Bourg d'Oisans. A Rochetaillée, partir en direction du lac de Grandmaison. Articol se trouve un peu avant le rivier d'Allemond. Départ par un petit sentier face aux maisons.",
'latlon': ['45.1779', '6.03655']},
'sommets': [{'id': '66',
'nom': 'Col de la Balmette',
'altitude': '2667',
'latlon': ['45.1735', '5.991']},
{'id': '6345',
'nom': 'Pic Lamartine',
'altitude': '2735',
'latlon': ['45.1753', '5.99239']}],
'refuges': [{'id': '519',
'nom': 'Chalet du Rif Premier',
'altitude': '2087',
...
'auteur': {'id': '1', 'pseudo': 'Jeroen'},
'photos': [{'id': '1388',
'com': 'Depuis le Rissiou',
'url': '/topos/photos/1388.jpg',
'auteur': {'id': '446', 'pseudo': 'Etienne-H-'}}]}
Blobs of data received from the APIs can be particurlarly lengthy, expecially when it comes to weather forecast. This is why I have created an llm_summarizer
function that makes this data more digestible for the agent.
Now let's implement our describe_route
tool:
class DescribeRouteTool(Tool):
name = "describe_route"
description = """
Searches for key information about a specific ski touring route,
including weather forecasts and associated avalanche risks.
Always use this tool after using the `list_routes` tool.
This tool returns a dictionary containing the route's information,
the avalanche risk estimation bulletin, and the weather forecast for the coming days of the route.
"""
inputs = {
"id_route": {
"description": "id of the route",
"type": "string",
},
"id_range": {
"description": "mountain range id of the route",
"type": "string"}
}
output_type = "any"
def __init__(self, skitour2meteofrance: dict, llm_engine: Union[HfApiModel, LiteLLMModel]):
super().__init__()
#Dictionary matching mountain ranges ids between skitour and Meteo France
self.massifs_infos = skitour2meteofrance
self.weather_client = MeteoFranceClient(access_token=os.getenv("METEO_FRANCE_API_KEY"))
self.llm_engine = llm_engine
def forward(self, id_route: str, id_range: str) -> dict:
# Get route info from skitour
route_info = get_details_route(str(id_route))
#Get mountain range conditions from Meteo France
avalanche_conditions = get_range_conditions(
self.massifs_infos[str(id_range)]['meteofrance_id']
)
lat, lon = topo_info["depart"]["latlon"]
weather_forecast = self.weather_client.get_forecast(float(lat), float(lon))
daily_forecast = weather_forecast.forecast
for day_forecast in daily_forecast:
day_forecast["dt"] = weather_forecast.timestamp_to_locale_time(day_forecast["dt"]).isoformat()
# Use an LLM to condense and present the data in a more digestible and user-friendly forma
forecast_summary = llm_summarizer(str(daily_forecast), self.llm_engine)
avalanche_summary = llm_summarizer(str(avalanche_conditions), self.llm_engine)
return {
"route_info": route_info,
"avalanche_conditions": avalanche_summary,
"daily_weather_forecast": forecast_summary,
"route_link": f"https://skitour.fr/topos/{id_route}"
}
You can also use the decorator @tool
to implement your tools.
Test the tool:
#Create engine
llm_engine = HfApiModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct")
#Dictionary matching mountain ranges ids between skitour and Meteo France computed manually
with open('data/skitour2meteofrance.json', 'r') as f:
skitour2meteofrance = json.load(f)
#Instantiate the tool
describe_route_tool = DescribeRouteTool(skitour2meteofrance, llm_engine)
print(describe_route_tool(id_route=2, id_range=12))
Output:
{'route_info': {'id': '2',
'nom': 'Col de la Balmette, Versant Est',
'orientation': 'E',
'denivele': '1670',
'dif_ski': '3.1',
'expo': '1',
'difficulte': 'R',
'gpx': '/topos/gpx/2.gpx',
'massif': {'id': '12', 'nom': 'Belledonne'},
'depart': {'id': '2',
'nom': 'Articol',
'altitude': '1005',
'acces': "Depuis Grenoble, prendre la route de Bourg d'Oisans. A Rochetaillée, partir en direction du lac de Grandmaison. Articol se trouve un peu avant le rivier d'Allemond. Départ par un petit sentier face aux maisons.",
'latlon': ['45.1779', '6.03655']},
'sommets': [{'id': '66',
'nom': 'Col de la Balmette',
'altitude': '2667',
'latlon': ['45.1735', '5.991']},
{'id': '6345',
'nom': 'Pic Lamartine',
'altitude': '2735',
'latlon': ['45.1753', '5.99239']}],
'refuges': [{'id': '519',
'nom': 'Chalet du Rif Premier',
'altitude': '2087',
...
'url': '/topos/photos/1388.jpg',
'auteur': {'id': '446', 'pseudo': 'Etienne-H-'}}]},
'avalanche_conditions': "Le bulletin météo et d'avalanches du 17 janvier 2025 indique un risque limité d'avalanches, en particulier en altitude, où il existe quelques plaques à vent. ... Les limites de skiabilité se sont élevées autour de 1000/1200 m sur les pentes nord et 1700 m au sud. La qualité de la neige est très variable, dépendant de l'altitude et de l'exposition au vent.\n\nLe temps est annoncé sec et ensoleillé, favorisant la stabilisation progressive du manteau neigeux.",
'daily_weather_forecast': 'The weather data from January 17th to the morning of January 18th, 2025, shows a clear and mostly sunny weather pattern with low humidity and no precipitation. Temperatures ranged from a high of 6.1°C during the day on January 17th to a low of -2.9°C overnight. ... Sea level pressure gradually decreased from around 1031.2 hPa to 1027.3 hPa. The data also included the 0°C isotherm level (iso0) fluctuating between 2150m to 2900m, indicating relatively stable atmospheric conditions with no significant snowfall or rain. Overall, pleasant and stable weather conditions persisted through the forecast period.',
'route_link': 'https://skitour.fr/topos/2'}
3. Build the Agent
Now that we have an LLM engine and tools we can easily instantiate a CodeAgent
with smolagents:
from smolagents import HfApiModel
from smolagents import CodeAgent
from src.tools import (MountainRangesTool, ForecastTool, GetRoutesTool, DescribeRouteTool, RecentOutingsTool
#Dictionary containing clusters of summits in a given moutain range to assign a location to a moutain range
#check src/utils.py
with open('data/summit_clusters.json', 'r') as f:
summit_clusters = json.load(f)
#Dictionary matching mountain ranges ids between skitour and Meteo France computed manually
with open('data/skitour2meteofrance.json', 'r') as f:
skitour2meteofrance = json.load(f)
#Loading tools
def get_tools(llm_engine):
mountain_ranges_tool = MountainRangesTool(summit_clusters)
forecast_tool = ForecastTool(
llm_engine=llm_engine,
clusters=summit_clusters,
skitour2meteofrance=skitour2meteofrance
)
get_routes_tool = GetRoutesTool()
description_route_tool = DescribeRouteTool(
skitour2meteofrance=skitour2meteofrance,
llm_engine=llm_engine
)
recent_outings_tool = RecentOutingsTool()
return [mountain_ranges_tool, forecast_tool, get_routes_tool, description_route_tool, recent_outings_tool]
alpine_agent = CodeAgent(
tools = get_tools(llm_engine),
model = llm_engine,
additional_authorized_imports=["pandas"], #other libraries that the agent can execute
max_steps=10, # Max number of action steps
)
4. Running the Agent
Once the agent is instantiated, you can use the .run()
method to answer questions. With the tool definitions in its context and the system prompt set by smolagent, the agent is already quite well-equipped to perform effectively.
To excel as a mountain expert assistant, I found it essential to provide additional specific information, such as the definitions of the difficulty grading system in ski touring and the preferred language for communicating with the user in its prompt. Luckily the .run()
implements a additional_args
parameters that allows to pass extra information that will be included into the LLM context. Let's create this prompt:
ROLE
You are an expert assistant specializing in ski touring. Your primary task is to assist users in {language} by providing tailored recommendations for ski touring itineraries, focusing on safety, grading systems, and user preferences.
TASK REQUIREMENTS
Use APIs and tools to gather data on:
Ski touring itineraries
Weather forecasts
Avalanche risks and conditions
Mountain hut access
Analyze the data and deliver user-friendly, detailed recommendations.
Always interogate yourself about the routes access, snow and weather conditions before suggesting them to the users. `describe_route` tool will be useful for that. It's the most important part of your job.
Answer general queries unrelated to ski touring to the best of your ability.
GRADING SYSTEMS
Ski Difficulty (1–5): Define skill levels based on slope gradient, exposure, and terrain.
Ascent Grading (R, F, PD, AD, D): Classify ascents based on technical challenges.
Exposure Grading (E1–E4): Highlight the severity of risks, from minor obstacles to life-threatening falls.
RESPONSE FORMAT
json
Copy code
{{
"message": "string (a detailed, user-friendly response in {language})",
"itineraries": [
{{
"topo_id": "string (ID of the itinerary from the API)",
"name": "string (name of the itinerary)",
"topo_start_lat": "float (latitude of itinerary start)",
"topo_start_lon": "float (longitude of itinerary start)",
"topo_link": "string (link to the itinerary from the API)"
}}
])
}}
Use the message field to explain recommendations and safety precautions clearly.
If no itineraries match or the query isn’t itinerary-related, set itineraries to None.
GUIDELINES
Always prioritize user safety. Warn users of unsafe conditions and suggest alternatives.
Respond only in {language}.
Structure messages to include relevant information such as:
Difficulty, ascent, and exposure grading.
Weather and avalanche conditions.
Recommendations for preparation and safety.
EXAMPLES
{{"question": Que proposes tu comme itinéraire de ski de randonnée vers Briançon?}}
{{'message': "Je vous recommande l'itinéraire 'Col de l'Aiguillette, Aller Retour depuis le pont
de l'Alpe', situé dans le massif des Cerces - Thabor - Mont Cenis. Ce parcours est d'une difficulté de ski de 2.2
et d'une exposition de 1, adapté pour les skieurs ayant un certain niveau de maîtrise. L'ascension est classée R,
facilement accessible, avec un gain d'élévation de 850 mètres.\n\n**Conditions Avalanches:**\nLes conditions
actuelles montrent un risque marqué d'avalanches en raison de nombreuses plaques friables et plus dures. Les
avalanches spontanées ainsi que celles déclenchées par les skieurs sont anticipées, un risque à considérer
sérieusement avant de poursuivre cet itinéraire.\n\n**Prévisions Météo:**\nLe 8 janvier, un léger enneigement est
prévu, avant de se transformer en pluie dans la matinée. Les températures commencent à refroidir et l'humidité est
élevée. Il est recommandé de bien se préparer pour ces conditions durant vos activités outdoor.\n\nPour votre
sécurité, évaluez toujours les conditions météo et avalanches directement sur le terrain avant de vous lancer dans
l'itinéraire. Bonne randonnée et restez prudent.", 'itineraries': [{{'topo_id': '104', 'name':Col de l'Aiguillette, Aller Retour depuis le pont
de l'Alpe ,'topo_link':
'https://skitour.fr/topos/104', 'topo_start_lat': 45.0181, 'topo_start_lon': 6.4663}}]}}
{{"question": Quelles sont les conditions météo pour le massif du Mont-Blanc ?}}
{{'message': "Les conditions météorologiques pour le massif du Mont-Blanc du 7 au 8 janvier 2025
indiquent des températures froides avec des vents de vitesse variable et un ciel couvert, accompagnés de périodes
de chutes de neige. Points clés :\n\n- **Températures** : Commençant à -19,3°C ressentis -30,5°C le 7 janvier à
16h, elles augmentent graduellement la nuit à environ -7°C à -8,6°C ressentis -11,4°C à -14,9°C le lendemain
après-midi.\n\n- **Vent** : Principalement de l'ouest-nord-ouest (260° à 300°) avec des vitesses de 6 à 10 km/h et
rafales jusqu'à 22 km/h, plus fortes pendant les chutes de neige.\n\n- **Conditions Météo** : Alternance de petites
éclaircies et ciel partiellement nuageux (30% de couverture), se chargeant fortement (90%) à partir de 20h avec des
épisodes de neige durant la nuit et au petit matin suivant.\n\n- **Précipitations** : Pas de pluie ; début de
légères chutes de neige à 21h avec accumulation augmentant pour atteindre jusqu'à 4,7 mm/heure durant la nuit du 8
janvier. La neige s'atténue ensuite.\n\n- **Humidité** : De 45% le soir à 100% la nuit, restant élevée durant les
chutes de neige.\n\n- **Pression au niveau de la mer** : Fluctuations légères, autour de 1010-1015 hPa, indiquant
des conditions stables avec un abaissement de pression la nuit.\n\n- **Limite Pluie-Neige et Niveau Iso:0** : Non
pertinent initialement, mais augmentant à 1550m à 2550m, suggérant des masses d'air chaud en
altitude.\n\n\nConcernant les avalanches, le bulletin du 8 janvier 2025 met en garde contre de nombreuses plaques
sensibles dans la neige fraîche, avec un risque marqué. Des avalanches peuvent se produire spontanément jusqu'à la
mi-journée au-dessus de 1800 m, et peuvent être facilement déclenchées par les skieurs au-dessus de 2000 m. Les
plaques vont de petite à moyenne taille (Taille 1 à 2), bien que des plaques plus grandes puissent se former
au-dessus de 2600/3000 m.\n\nPour votre sécurité, tenez compte des prévisions de précipitations ventées dès
mercredi soir. La neige est lourde et mouillée sous 1600 m, affectée par les pluies. L'enneigement reste moyen pour
la saison au-dessus de 2000 m.\n\nPour des mises à jour de vigilance, veuillez consulter les sites dédiés.",
'itineraries': None}}
{{"question": Hello how are you?}}
{{'message': "I'm doing great and you, how can I help you today?", 'itineraries': None}}
Notice that I have included few-shot examples to guide the agent on the preferred responses. Ok now let's run the agent:
alpine_agent.run("Can you suggest a route near Grenoble with good conditions?",
additional_args={
"skier_agent_definition": SKI_TOURING_ASSISTANT_PROMPT.format(language="English")
})
Final Answer
Final answer: {'message': "I recommend the route 'Col de la Balmette, Versant Est' in the Belledonne massif. This route has a moderate difficulty level of 3.1 and a low exposure level of 1,
making it suitable for intermediate skiers. The avalanche conditions are stable, and the weather forecast is favorable with clear skies and no precipitation expected. The route starts from Articol and
ascends to the Col de la Balmette, offering beautiful views and a challenging descent. Be sure to check the latest avalanche conditions and weather forecast before setting out.", 'itineraries':
[{'topo_id': '2', 'name': 'Col de la Balmette, Versant Est', 'topo_start_lat': 45.1779, 'topo_start_lon': 6.03655, 'topo_link': 'https://skitour.fr/topos/2'}]}
Now you can directly try out the agent which was wrapped into a Gradio Space and available at florentgbelidji-alpine-agent.hf.space
Takeaways from building Alpine Agent
1️⃣ smolagents simplifies agentic app development. It enablse seamless integration of open- or closed-source models with minimal coding effort and no unnecessary abstractions
2️⃣ LLM agents require response time. Complex tasks often involve multiple steps, making them slower than instant outputs but still significantly faster than manual planning.
3️⃣ Long-context LLMs are vital. Context acts as a memory buffer for planning, actions, and observations across multiple steps. I found that a minimum of 32,000 tokens is necessary, with systems performing much better at 64,000 tokens or more.
4️⃣ Strong LLMs are essential for success. Effective workflows demand strong reasoning capabilities. My testing revealed that Qwen2.5-Coder-32B-Instruct, Llama-3.3-70B-Instruct, and GPT-4 are excellent choices for this use case.
5️⃣ Domain-specific prompts improve responses. A well-crafted prompt that complements the agent library’s system prompt, includes domain-relevant information, and incorporates few-shot examples helps the agent respond more accurately to users.
6️⃣ Clear tool definitions are key. Tools must have explicit definitions outlining when they should be used to help the agent establish the right workflow. As the list of tools grows, precise definitions become even more critical for the agent to select the appropriate one.
Acknowledgement
I thank Aymeric Roucher for guidance and test of this tool.