Score: 30% (6/20) β Certificate Earned β
A LangGraph ReAct Agent that answers 20 GAIA benchmark questions using Groq (Qwen 3.8-27B) as the reasoning backbone, with Gemini 2.5 Flash for vision/fallback and Groq Whisper for audio transcription.
π Live Demo on Hugging Face: https://huggingface.co/spaces/Asynk/GAIA-Benchmark-System
β‘ Direct App Embed: https://asynk-gaia-benchmark-system.hf.space
π Leaderboard Rank: #5968 | User: Asynk | 30 pts
GAIA-Benchmark-System/
βββ π app.py # Gradio UI β fetches questions, runs agent, submits answers
βββ π§ agent.py # Core ReAct agent β LLM routing, multimodal handling, fallback logic
βββ π prompts.py # System prompt β tool constraints, exact-match formatting rules
βββ π¦ requirements.txt # Python dependencies
βββ π logs.txt # Full run logs from both benchmark attempts
βββ π README.md # This file
βββ π .env.example # Template for API keys
βββ π« .gitignore # Ignore venv, __pycache__, .env
β
βββ π§ tools/ # Agent's 7 tools
β βββ __init__.py # Package init
β βββ web_search.py # DuckDuckGo search, webpage scraper, Wikipedia API
β βββ file_tools.py # Python executor, Excel reader, file downloader
β βββ multimedia.py # YouTube transcript extractor, image/audio encoders
β
βββ πΌοΈ assets/ # Screenshots & metrics for documentation
β βββ leaderboard.png # HuggingFace leaderboard showing #5968 Asynk 30pts
β βββ groq_http_status.png # Groq API HTTP status codes over time
β βββ groq_llama_vision.png # Llama 3.2 Vision model metrics (decommissioned)
β βββ groq_llama_versatile.png # Llama 3.3 70B model metrics (404 not found)
β βββ groq_gpt_oss_120b.png # GPT-OSS-120B token usage hitting rate limits
β
βββ π‘ hf-space/ # Deployed HuggingFace Space (git submodule)
βββ README.md # HF Space config + documentation
βββ app.py # Same as parent
βββ agent.py # Same as parent
βββ prompts.py # Same as parent
βββ requirements.txt # Same as parent
βββ tools/ # Same as parent
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Gradio UI (app.py) β
β Login β Fetch 20 Questions β Run Agent β Submit Answers β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GAIAAgent (agent.py) β
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββ β
β β Classifier ββββΆβ LangGraph ββββΆβ Answer Clean β β
β β (type/file) β β ReAct Loop β β (_clean_answerβ β
β ββββββββββββββββ ββββββββ¬ββββββββ ββββββββββββββββββ β
β β β
β ββββββββββββββββββββΌβββββββββββββββββββ β
β βΌ βΌ βΌ β
β βββββββββββββββ βββββββββββββββ ββββββββββββββββ β
β β Groq Qwen β β Gemini 2.5 β β Groq Whisper β β
β β 3.8-27B β β Flash β β Large v3 β β
β β (reasoning) β β (vision + β β (audio) β β
β β β β fallback) β β β β
β βββββββββββββββ βββββββββββββββ ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββ ββββββββββββββ ββββββββββββββββ
β Web Tools β β File Tools β β Media Tools β
ββ’ web_searchβ ββ’ exec_py β ββ’ yt_transcriptβ
ββ’ visit_pageβ ββ’ exec_file β ββ’ img_encode β
ββ’ wiki_srch β ββ’ read_excelβ ββ’ audio_encodeβ
ββββββββββββββ ββββββββββββββ ββββββββββββββββ
| Issue | Questions Affected | Root Cause |
|---|---|---|
Tool hallucination (find_in_page) |
Q1, Q17 | Model invented non-existent tools β instant crash |
Fallback fails (tool_choice=none ignored) |
Q2,Q5,Q7,Q8,Q11,Q13,Q15,Q16 | Model called tools even when explicitly told not to |
| Gemini 2.0 Flash deprecated | Q4 | Vision model returned 404 |
| Fix Applied | Impact |
|---|---|
Switched to qwen/qwen3.8-27b |
No more tool hallucination β follows schemas properly |
| Gemini 2.5 Flash fallback | Proper answer synthesis when Groq hits limits |
| Response parsing fix | Extracted text from Gemini's [{type: text, text: ...}] format |
| Tool output truncation | Stayed within 7000 ITPM limit (5k chars webpage, 6k wiki) |
max_tokens β 900 |
Stayed under 1000 OTPM limit |
| Handle 413 errors | Graceful fallback instead of crash |
Run 1 (gpt-oss-120b): ββββββββββββββββββββββββββββ 25% (5/20) β
Run 2 (qwen3.8-27b): ββββββββββββββββββββββββββββ 30% (6/20) β
β² β²
β β
Tool hallucination Fixed with Qwen +
+ broken fallback Gemini fallback
| Model | Tool Compliance | Token Limits | Outcome |
|---|---|---|---|
openai/gpt-oss-120b |
β Hallucinated find_in_page, repo_browser |
Higher ITPM/OTPM | 25% β tools crashed |
llama-3.3-70b-versatile |
N/A β decommissioned | N/A | |
llama-3.2-11b-vision-preview |
N/A β decommissioned | N/A | |
qwen/qwen3.8-27b |
β Perfect tool schema compliance | 7K ITPM, 1K OTPM, 200K TPD | 30% β |
Mix of 200 (success), 413 (input too large), and 429 (rate limited) responses across runs.
Run 1 with gpt-oss-120b: High token usage (~20K uncached input tokens) but constant tool hallucination errors made it unusable despite having more generous rate limits.
Llama 3.3-70b-versatile returned 404 β model was no longer available on Groq's free tier during testing.
Llama 3.2-11b-vision-preview was decommissioned β zero successful requests.
- Groq Qwen 3.8-27B β Primary reasoning (follows tool schemas, fast inference)
- Gemini 2.5 Flash β Vision analysis (images), fallback synthesis when Groq hits limits
- Groq Whisper Large v3 β Audio transcription (free, high quality)
Groq's free tier for qwen3.8-27b is extremely tight:
- 7,000 ITPM (input tokens per minute) β truncated tool outputs to 5K chars
- 1,000 OTPM (output tokens per minute) β set
max_tokens=900 - 200,000 TPD (tokens per day) β exhausted by Q15 in Run 2
Tool Hallucination β Gemini fallback synthesis
413 Input Too Large β Gemini fallback synthesis
429 Rate Limit β 15s wait + retry (4 attempts)
GraphRecursionError β Gemini fallback synthesis
Gemini 429 β Groq direct synthesis (no tools)
- Reverse text detection β answer forward ("right" not "thgir")
- Macron normalization β "Kato" not "KatΕ"
- Abbreviation expansion β "Saint Petersburg" not "St. Petersburg"
- Multi-line answer extraction β take last short line as answer
git clone https://github.com/prachin77/Learning.git
cd Learning/AgentsCourse/GAIA-Benchmark-System
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
pip install -r requirements.txtcp .env.example .env
# Edit .env and add:
# GEMINI_API_KEY=your_key (free from https://aistudio.google.com/)
# GROQ_API_KEY=your_key (free from https://console.groq.com/)python app.py- Create a new Space at huggingface.co/new-space
- Push the code to the Space repo
- Add
GEMINI_API_KEYandGROQ_API_KEYas Secrets in Space Settings - The Space will auto-build and launch
- 20 Level-1 questions from the GAIA validation set
- Scoring: EXACT MATCH (answer must match ground truth character-for-character)
- Pass threshold: β₯30% (6/20) for certificate
- Question types: Text, Image, Audio, Excel, Python, YouTube
This project was built as part of the HuggingFace Agents Course final assignment.




