# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json

description: Web search grounding with Google Gemini models

prompts:
  - '{{query}}'

providers:
  # Google Search as a tool (using Gemini 2.5 Flash)
  - id: google:gemini-2.5-flash
    config:
      temperature: 0.2
      maxOutputTokens: 1024
      tools:
        - googleSearch: {}

  # Alternate version with thinking capabilities
  - id: google:gemini-2.5-pro
    config:
      temperature: 0.2
      maxOutputTokens: 1024
      generationConfig:
        thinkingConfig:
          thinkingBudget: 1024
      tools:
        - googleSearch: {}

  # Dynamic retrieval configuration for Gemini 2.5 models
  - id: google:gemini-2.5-flash-lite
    config:
      temperature: 0.2
      maxOutputTokens: 1024
      tools:
        - googleSearchRetrieval:
            dynamicRetrievalConfig:
              mode: 'MODE_DYNAMIC'
              dynamicThreshold: 0

tests:
  # Test current events
  - vars:
      query: What is the current Google stock price?
    assert:
      - type: contains
        value: stock
      - type: contains
        value: price

  # Test a technical question
  - vars:
      query: What are the latest features in TypeScript?
    assert:
      - type: contains
        value: TypeScript
      - type: contains
        value: feature

  # Test a factual question
  - vars:
      query: Who won the most recent Super Bowl?
    assert:
      - type: contains
        value: Super Bowl
      - type: contains
        value: won
