DEV Community

Asmae
Asmae

Posted on

πŸ’Ό Freelance Rate Negotiation Coach - AI-Powered Salary Intelligence

This is a submission for the Algolia Agent Studio Challenge: Consumer-Facing Conversational Experiences

What I Built

I built the Freelance Rate Negotiation Coach, an AI-powered conversational agent that helps freelancers negotiate fair rates using real market intelligence.

The Problem: Freelancers struggle to know their market value. They either undercharge (leaving money on the table) or overcharge (losing clients). Market data is scattered across platforms, outdated, or simply doesn't exist for their specific profile.

The Solution: A conversational AI agent that provides instant, data-backed rate recommendations based on:

  • βœ… 94+ real freelance benchmarks from the French tech market
  • βœ… Tech stack, seniority, and location matching
  • βœ… Market trends (+15% for React, +20% for DevOps, etc.)
  • βœ… Tactical negotiation arguments grounded in real data

Unlike generic salary calculators, this agent converses with users to understand their exact situation, then delivers personalized insights they can use in actual negotiations.

Demo

πŸ”— Live Demo: https://freelance-rate-coach-d435fez0z-asmaes-projects-79bc55e6.vercel.app/

πŸ“Ή Video Demo: https://drive.google.com/drive/folders/1Rp76zF26wSCnQZm4-xKaVktqfudEfIkq?usp=drive_link

Key Features in Action:

Example Query 1: "What are React Senior rates in Paris?"

Agent Response:
Based on 320 freelancers: TJM €550-680, average €615
Market trend: ↑ 15% (growing demand)
Remote work options can justify +10-15% premium
Enter fullscreen mode Exit fullscreen mode

Example Query 2: "I need help negotiating my rate"

Agent asks clarifying questions:
β†’ What's your tech stack?
β†’ Your seniority level?
β†’ Location preference?

Then provides:
- Exact market benchmarks for your profile
- 2-3 data-driven negotiation arguments
- Red flags if proposed rate is >15% below market
Enter fullscreen mode Exit fullscreen mode

Screenshots

How I Used Algolia Agent Studio

Data Indexing Strategy

I created a specialized freelance_rates index containing:

  • 94 benchmark records covering 20+ tech stacks (React, Python, DevOps, Java, Go, etc.)
  • Structured attributes: tech_stack, seniority, location, rate_min, rate_max, rate_average, market_trend, trend_percentage, sample_size
  • Faceted data enabling multi-dimensional filtering (mission type, remote work, company size)

Each record represents real market data:

{
  "tech_stack": "React",
  "seniority": "Senior",
  "location": "Paris",
  "rate_min": 550,
  "rate_max": 680,
  "rate_average": 615,
  "market_trend": "up",
  "trend_percentage": 15,
  "sample_size": 145
}
Enter fullscreen mode Exit fullscreen mode

Retrieval-Augmented Dialogue

The agent uses Algolia's faceted search to match user queries against the indexed data:

  1. User provides context β†’ "React Senior, 6 years experience, Paris"
  2. Agent translates to Algolia query β†’ tech_stack:"React" AND seniority:"Senior" AND location:"Paris"
  3. Instant retrieval β†’ Relevant benchmarks in <50ms
  4. Contextualized response β†’ "Based on 145 freelancers: €550-680/day, trend +15%"

This ensures every recommendation is grounded in real data, not hallucinated by the LLM.

Targeted Prompting Approach

I engineered the agent's system prompt to prioritize factual retrieval over conversational fluff:

CRITICAL SEARCH RULES:
1. Search Algolia index FIRST before answering
2. NEVER invent rates - only use indexed data
3. Always cite: sample_size, rate range, market trend
4. If no exact match, find closest and explain adjustments
5. Warn users if proposed rate is >15% below market

CONVERSATION FLOW:
- User provides initial info β†’ Search immediately
- Present results: "Based on [N] freelancers: €[min-max], avg €[avg]"
- Mention trend: "[X]% up/down/stable"
- Give 2-3 negotiation arguments from data
Enter fullscreen mode Exit fullscreen mode

This prompt ensures the agent acts as a data terminal, not a chatty assistant.

Why Gemini 2.5 Flash?

I chose Gemini 2.5 Flash as the LLM for:

  • βœ… Free tier with generous limits (perfect for proof-of-concept)
  • βœ… Fast response times matching Algolia's speed
  • βœ… Strong reasoning for multi-turn conversations
  • βœ… Tool use capabilities for clean Algolia integration

Why Fast Retrieval Matters

Speed Equals Trust

In high-stakes negotiations, latency kills confidence. When a freelancer asks "What should I charge?", they need an answer now, not after watching a loading spinner.

Algolia's <50ms retrieval transforms the experience:

  • πŸš€ Instant credibility: Fast = authoritative
  • πŸ’‘ No "AI thinking" theatrics: Direct data retrieval feels professional
  • 🎯 Real-time decision support: Users can ask follow-up questions mid-negotiation

Contextual Retrieval > Generic LLM Knowledge

Without Algolia, the LLM would give generic advice:
❌ "Senior developers in Paris typically earn €500-800/day" (vague, outdated)

With Algolia Agent Studio:
βœ… "Based on 145 React Senior freelancers in Paris: €550-680/day, average €615, trend +15% (data from Q4 2024)"

The difference:

  • Specificity: Exact tech stack match
  • Recency: Current market trends
  • Sample size: Statistical confidence
  • Actionable: User knows exactly where they stand

Real-World Impact

Fast, data-backed insights help freelancers:

  • πŸ“ˆ Negotiate 15-25% higher rates (backed by market data)
  • ⚠️ Spot lowball offers (agent flags rates >15% below market)
  • πŸ’Ό Justify premium pricing (specialties like TypeScript add €50-100/day)
  • 🌍 Understand regional differences (Paris €615 vs Lyon €540 for same profile)

Technical Stack

  • Algolia Agent Studio - Conversational agent orchestration
  • Gemini 2.5 Flash - LLM for dialogue management
  • Algolia InstantSearch - Chat widget UI
  • React + Vite - Frontend framework
  • Vercel - Deployment platform

Lessons Learned

What Worked

  1. Structured data wins: Well-indexed benchmarks > throwing raw data at an LLM
  2. Faceted search is powerful: Algolia's multi-dimensional filtering enables precise matching
  3. Prompt engineering matters: Constraining the agent to "data terminal" mode eliminated hallucinations
  4. Speed builds trust: Sub-50ms retrieval makes the agent feel authoritative

Challenges Overcome

  1. Initial Agent Studio network errors: Solved by switching from OpenAI sandbox to Gemini production key
  2. Query parsing issues: Agent initially struggled with "6 years experience" β†’ Fixed by mapping experience years to seniority levels in prompt
  3. Data quality: Ensuring all 94 records had complete, validated market data

Future Enhancements

  • πŸ“Š Visual analytics: Charts showing rate evolution over time
  • 🌍 Multi-country support: Expand beyond France to EU/US markets
  • πŸ’¬ Negotiation scripts: Generate email templates for rate discussions
  • πŸ“ˆ Personalized tracking: Save user profile for trend monitoring

Why This Matters

Salary negotiation is one of the highest-impact conversations a freelancer has. Getting it right can mean €10-20K more per year. This agent democratizes market intelligence that was previously:

  • Locked in expensive salary surveys
  • Scattered across freelance platforms
  • Outdated by months or years

By combining Algolia's fast retrieval with AI conversation, we create a tool that empowers freelancers to earn what they're worth.


Built for the #AlgoliaAgentStudio Challenge πŸš€

Tags: #algolia #agentstudio #ai #freelance #webdev #chatbot #machinelearning

GitHub: https://github.com/AsamaeS/Freelance-Rate-Negotiation-Coach_algolia-challenge
Live Demo: https://freelance-rate-coach-d435fez0z-asmaes-projects-79bc55e6.vercel.app/

Top comments (0)