Alfa Tool Examples
Understanding Alfa Tools
Alfa agents use specialized tools to execute the steps in your prompts. These tools provide fine-grained control over three key aspects of the agent’s work:
- Inputs - Select and retrieve data from various sources
- Operations - Process and analyze the data
- Outputs - Format and present the results
This guide provides examples of some of our most powerful tools and how to use them in your prompts.
Simply reference these tools in natural language within your prompts. For example: “Use websearch to find recent information on Apple, then use Text to Table to extract all product launches and dates.”
Input Tools
Input tools help you select and retrieve data from various sources, including financial databases, web content, news, and custom documents.
Web Intelligence
Description: Search the web for information on any topic.
When to use it: When you need general information from the web that isn’t necessarily stock-specific.
Example use case: “Find information about recent inflation trends.”
Key parameters:
queries: List of search terms you want to look upurls: Optional specific web addresses to include in your searchdate_range: Optional timeframe to limit your search results
Tips:
- Use specific, targeted queries for better results
- Results will be automatically summarized for readability
- Can be used with or without specific URLs
Description: Extract text content from specific web pages.
When to use it: When you want to analyze information from particular web pages you already know about.
Example use case: “Read the content of Apple’s latest press release at [specific URL].”
Key parameters:
urls: Full web addresses of the pages you want to extractqueries: Optional additional search terms to find related content on the same site
Tips:
- Always include the complete URL including domain and routing
- Use this when you want content from specific pages you already know
- Results will be automatically processed and summarized
News & Information
Description: Retrieve news events and developments about specific companies.
When to use it: When you want to understand significant news events affecting particular stocks.
Example use case: “What major news has affected Microsoft in the past month?”
Key parameters:
stock_ids: The companies you want news aboutdate_range: Timeframe for the news (defaults to the last week)
Tips:
- Provides organized news events rather than just articles
- Use for a high-level view of important company developments
- Cannot be used for future dates - only past and present news
Financial Data
Description: Retrieve financial and statistical data for companies.
When to use it: When you need specific metrics or financial data for stocks.
Example use case: “What’s the P/E ratio for Tesla compared to other automakers?”
Key parameters:
statistic_reference: The metric to retrieve (e.g., “P/E Ratio”, “Revenue”)stock_ids: Stocks to analyzedate_range: Optional timeframe for analysisis_time_series: Whether to return a series of values over timetarget_currency: Optional currency conversion
Tips:
- Can handle simple and complex financial metrics
- Supports time series for trend analysis
- Can calculate derived statistics (ratios, growth rates, etc.)
- Very flexible with natural language descriptions of statistics
Description: Retrieve economic and market-wide statistical data.
When to use it: When you need data on broad economic indicators.
Example use case: “Show me how interest rates have changed over the past year.”
Key parameters:
statistic_reference: The metric to retrieve (e.g., “Interest Rates”, “Inflation”)date_range: Optional timeframe for analysis
Tips:
- Works with macroeconomic indicators not tied to specific stocks
- Can show time series for trend analysis
- Useful for economic context in investment decisions
- Examples include interest rates, inflation, unemployment, GDP
Description: Get current market prices for stocks.
When to use it: When you need the most up-to-date price information.
Example use case: “What’s the current price of Amazon stock?”
Key parameters:
stock_ids: Stocks to get prices for
Tips:
- Returns the most recent available price
- Shows intraday/real-time prices during market hours
- Only shows current prices - use statistics tool for historical prices
- Cannot be used for calculations - use statistics tool for that
Description: Retrieve full transcripts of company earnings calls.
When to use it: When you need complete, verbatim records of earnings calls.
Example use case: “Get me the full transcript of Tesla’s latest earnings call.”
Key parameters:
stock_ids: Companies to get earnings call transcripts fordate_range: Timeframe for the earnings calls
Tips:
- Returns complete, unabridged transcripts
- Use only when complete transcripts are explicitly requested
- Great for searching specific phrases or detailed analysis
- Cannot find documents from the future
- Defaults to last quarter if no date range specified
Description: Retrieve condensed summaries of company earnings calls.
When to use it: When you need the key points from earnings calls without all the details.
Example use case: “Summarize Apple’s last earnings call.”
Key parameters:
stock_ids: Companies to get earnings call summaries fordate_range: Timeframe for the earnings calls
Tips:
- Returns concise summaries instead of full transcripts
- Default tool for earnings call information
- More efficient than full transcripts for general understanding
- Cannot find documents from the future
- Defaults to last quarter if no date range specified
Description: Access professional research reports about companies.
When to use it: When you need in-depth professional analysis from financial analysts.
Example use case: “Find research reports about Nvidia’s AI strategy.”
Key parameters:
stock_ids: Companies to get research fordate_range: Timeframe for the research
Tips:
- Provides access to professional broker (sell-side) research
- Contains detailed analysis beyond news or company statements
- Cannot find documents from the future
- Only use when specifically asked for research documents
Description: Retrieve official regulatory filings like SEC documents.
When to use it: When you need specific types of regulatory filings.
Example use case: “Find all 8-K filings for Tesla from last year.”
Key parameters:
stock_ids: Companies to get filings forform_types: Types of filings to retrievedate_range: Timeframe for the filingsuse_full_text: Whether to get complete documents
Tips:
- Must be used after Filings Type Lookup tool
- Retrieves specific filing types (10-K, 10-Q, 8-K, etc.)
- Set use_full_text=True for complete filing text
- Cannot find documents from the future
- Results should be summarized, not shown directly
Operation Tools
Operation tools help you process, analyze, and extract insights from the data you’ve collected using input tools.
Analysis & Comparison
Description: Calculate the year-over-year percentage change for a specific statistic.
When to use it: When you need to see how a metric has changed compared to the same period last year.
Example use case: “What’s the year-over-year revenue growth for Apple?”
Key parameters:
statistic_reference: The metric to analyze (e.g., “Revenue”)stock_ids: Stocks to analyzedate_range: Optional timeframe for analysisis_time_series: Whether to return a series of values over timetarget_currency: Optional currency conversion
Tips:
- Shows percentage change from previous year’s value
- Also known as YoY or year-on-year change
- Use for trend analysis and growth evaluation
Description: Analyze future revenue growth expectations for stocks.
When to use it: When you want to understand analysts’ expectations for future growth.
Example use case: “Which technology companies have the highest expected revenue growth?”
Key parameters:
stocks: Stocks to analyzenum_quarters: How many future quarters to look aheadmode: Whether to check “earnings” or “revenue” expectations
Tips:
- Shows expected percentage growth based on analyst forecasts
- Can analyze either revenue or earnings expectations
- Compares actual past figures with future estimates
- Useful for forward-looking investment decisions
Description: Generate insights, themes, or patterns from text data.
When to use it: When you want to identify patterns or trends in information.
Example use case: “What are the key themes in recent quarterly reports for tech companies?”
Key parameters:
idea_definition: Description of the type of insights you’re looking fortexts: Information to analyzemax_ideas: Maximum number of ideas to generateformat_instructions: Optional guidance on output format
Tips:
- Can identify patterns, themes, trends, events, policies, etc.
- Provides descriptions and supporting evidence for each idea
- Useful for thematic analysis and trend identification
- Great for brainstorming investment themes or macroeconomic patterns
Description: Extract specific answers from text information.
When to use it: When you have a specific question that can be answered from text data.
Example use case: “What countries does Coca-Cola operate in according to their latest annual report?”
Key parameters:
question: The specific question to answertexts: Information to search for the answer
Tips:
- Focuses on finding precise answers rather than summarizing
- Good for factual questions with definitive answers
- More targeted than general summarization
- Uses relevance filtering to find pertinent information
Data Transformation
Description: Perform custom operations on tables of data.
When to use it: When you need to sort, filter, rank, or aggregate table data.
Example use case: “Rank these stocks by market cap and show only those above $10 billion.”
Key parameters:
input_table: The table to transformtransformation_description: Detailed description of the transformation to perform
Tips:
- Can perform sorting, filtering, ranking, and aggregation
- Uses natural language descriptions for transformations
- Great for complex data manipulations
- Not for time-based calculations (use statistical tools instead)
Filter & Ranking
Description: Filter stocks based on whether they beat or missed earnings expectations.
When to use it: When you want to find stocks that exceeded or fell short of analyst estimates.
Example use case: “Show me S&P 500 companies that beat earnings expectations last quarter.”
Key parameters:
stocks: List of stocks to filtermiss: Whether to find misses (True) or beats (False)quarters: Number of quarters or specific quarters to checkmode: Whether to check “earnings” or “revenue” expectationsfilter: Whether to filter the list or just provide beat/miss information
Tips:
- Can check either earnings or revenue expectations
- Can look at specific quarters or a number of recent quarters
- Provides actual figures, expected figures, and surprise percentages
- Set filter=False for analysis of specific stocks without filtering
Description: Filter and rank stocks based on their relevance to a theme or profile.
When to use it: When you want to find stocks related to a specific concept or theme.
Example use case: “Find companies that are leaders in sustainable manufacturing.”
Key parameters:
stocks: Stocks to filterstock_texts: Information about the stocksprofile: Description of what you’re looking forcomplete_ranking: Whether to fully rank the stocksscore_threshold: Minimum score for inclusiontop_n: Optional limit to just the top N resultsbottom_m: Optional inclusion of the bottom M resultsno_filter: Whether to include all stocks with any relevance
Tips:
- Provides detailed scoring and explanations for matches
- Can be used with simple string profiles or complex profiles from Generate Profiles
- Set complete_ranking=True for “best” or “worst” matching
- Set score_threshold to control quality cutoff (0-5 scale)
- Results include reasoning for each stock’s inclusion
Summarization
Description: Create separate summaries for each idea in a list.
When to use it: When you need individual text summaries for multiple ideas or themes.
Example use case: “For each macroeconomic trend identified, summarize how it affects tech stocks.”
Key parameters:
ideas: List of ideas to create summaries fortexts: Information related to the ideastopic_template: Template for what to summarize about each ideacolumn_header: Header for the summary column
Tips:
- Creates focused summaries for each idea from a brainstorming session
- Must use “IDEA” as a placeholder in the topic template
- Builds on the output of the Idea Brainstorm tool
- Results appear as a column in the ideas table
Description: Collect and prepare information needed for writing market commentary.
When to use it: When you want to gather data for a comprehensive market analysis.
Example use case: “Prepare to write a commentary on recent tech sector performance.”
Key parameters:
stock_ids: Specific companies to includetopics: Subjects to focus onuniverse_name: Market index or ETF to analyzedate_range: Timeframe to analyzeportfolio_id: Optional portfolio to analyzemacroeconomic: Whether to include macroeconomic trendstheme_num: Number of top themes to identifytop_n_stocks: Number of top contributors to highlight
Tips:
- Essential preparation step before Write Commentary
- Gathers relevant data for comprehensive analysis
- Can focus on specific companies, sectors, markets, or portfolios
- Can include macroeconomic context when relevant
Output Tools
Output tools help you format and present your results in the most useful way.
Data Formatting
Description: Extract structured table data from text information.
When to use it: When you need to convert unstructured text into organized table format.
Example use case: “Extract a table of product launches and dates from these press releases.”
Key parameters:
texts: Information to convert to a tabletable_description: Description of the table to createtable_schema: Column definitions for the tablefrom_description_only: Whether to create the table purely from description
Tips:
- Converts unstructured information into structured tables
- Requires defining columns and their data types
- Great for extracting comparable data points from text
- Must not be used on already summarized text - use original sources
Visualization
Description: Create a line chart from tabular data.
When to use it: When you want to visualize trends over time or continuous relationships.
Example use case: “Show me a graph of Apple’s stock price over the past year.”
Key parameters:
input_table: Table data to visualize
Tips:
- Best for time series data or continuous relationships
- Good for price trends, performance metrics over time, etc.
- Requires at least 7-14 data points for a meaningful visualization
- Input must be a properly structured table
Description: Create a pie chart from tabular data.
When to use it: When you want to show proportions of a whole.
Example use case: “Show the sector breakdown of my portfolio as a pie chart.”
Key parameters:
input_table: Table data to visualize
Tips:
- Best for showing parts of a whole
- Good for portfolio allocations, market share, etc.
- Works best with a single dimension of categorical data
- Not suitable for time series or multiple periods
Description: Create a bar chart from tabular data.
When to use it: When you want to compare discrete categories.
Example use case: “Create a bar chart showing revenue by product category.”
Key parameters:
input_table: Table data to visualize
Tips:
- Best for comparing discrete categories
- Good for performance across categories, rankings, etc.
- Works well with multi-dimensional data in discrete buckets
- Not ideal for continuous time series data
Description: Get buy/sell recommendations and analysis for stocks.
When to use it: When you want investment recommendations with supporting rationales.
Example use case: “Which tech stocks look most promising right now?”
Key parameters:
stock_ids: Stocks to analyzefilter: Whether to filter the list to recommended stocksbuy: For buy (True) or sell (False) recommendations, or None for neutral analysishorizon, delta_horizon, news_horizon: Time frames for analysisnews_only: Whether to focus solely on news sentimentnum_stocks_to_return: Optional limit on resultsstar_rating_threshold: Minimum rating for inclusioninvestment_style: Optional investment approach to considerdate: Optional date for historical analysisbullets: Whether to format reasoning as bullet points
Tips:
- Provides scores, ratings, and detailed rationales
- Can filter to just buy or sell recommendations
- Can focus on news sentiment or include quantitative metrics
- Set filter=False for analysis without filtering
- Star ratings are on a 5-point scale
Description: Evaluate and compare companies competing in a specific market.
When to use it: When you need detailed competitive positioning of companies.
Example use case: “Is Amazon the leader in cloud computing compared to Microsoft and Google?”
Key parameters:
prompt: The competitive question to analyzecriteria: Evaluation criteria (from Get Criteria for Competitive Analysis)stocks: Companies to compareall_text_data: Information about the companiestarget_stock: Optional focal company for the analysis
Tips:
- Provides detailed scoring and analysis across multiple criteria
- Evaluates relative market positioning
- Requires criteria, stocks, and comprehensive text data
- Best for qualitative market leadership questions
- Not for simple quantitative comparisons
