schoemantian's picture
Fixing the Hugging Face Space Configuration
0dc4fd0 verified

A newer version of the Gradio SDK is available: 5.33.0

Upgrade
metadata
title: GAIA Assessment Agent
emoji: 🤖
colorFrom: indigo
colorTo: blue
sdk: gradio
sdk_version: 5.25.2
app_file: app.py
pinned: false
hf_oauth: true
hf_oauth_expiration_minutes: 480

GAIA Assessment Agent

This is my submission for the Hugging Face Agents Course final assessment. The agent is designed to answer questions from the GAIA benchmark with high accuracy.

Features

  • LangGraph Architecture: Uses LangGraph for effective agent orchestration
  • Multi-Tool Strategy: Integrates web search, Wikipedia, ArXiv, and math tools
  • Vector Similarity Search: Finds similar questions for better context
  • Multiple Model Support: Can use Groq, Google Gemini, Anthropic Claude, or OpenAI models
  • Optimized Response Format: Ensures answers match the expected format for GAIA benchmark

Setup

  1. Clone this repository

  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Create a .env file with your API keys:

    GROQ_API_KEY=your-groq-api-key
    GOOGLE_API_KEY=your-google-api-key
    ANTHROPIC_API_KEY=your-anthropic-api-key
    OPENAI_API_KEY=your-openai-api-key
    TAVILY_API_KEY=your-tavily-api-key
    SUPABASE_URL=your-supabase-url
    SUPABASE_SERVICE_KEY=your-supabase-service-key
    
  4. Run the application:

    python app.py
    

How It Works

The agent uses a multi-step approach to answer questions:

  1. Question Analysis: Analyzes the question to determine required tools and approach
  2. Similar Question Search: Searches for similar questions in the vector database
  3. Information Gathering: Uses appropriate tools to gather relevant information
  4. Answer Formulation: Generates a precise answer in the required format

Agent Architecture

User Question → Vector Search → Query Formulation → Tool Selection → Response Integration → Answer Formulation

Environment Variables

  • GROQ_API_KEY: API key for Groq models
  • GOOGLE_API_KEY: API key for Google Gemini models
  • ANTHROPIC_API_KEY: API key for Anthropic Claude models
  • OPENAI_API_KEY: API key for OpenAI models
  • TAVILY_API_KEY: API key for Tavily search engine
  • SUPABASE_URL: URL for Supabase instance
  • SUPABASE_SERVICE_KEY: Service key for Supabase instance

Performance

The agent is designed to achieve a high score on the GAIA benchmark by:

  • Using multiple tools to gather comprehensive information
  • Leveraging vector similarity search for contextual understanding
  • Processing questions step-by-step with appropriate tool selection
  • Optimizing answer formatting to match expected GAIA output format

Credits

This project was created as part of the Hugging Face Agents Course final assessment.