query_experiments

Search a project's experiments by semantic similarity of the title and hypothesis. Returns the closest matches, not a full catalog.

Operation ID: query_experiments

Search a project's experiments by semantic similarity of the title and hypothesis. Returns the closest matches, not a full catalog.

When to use: You need experiments in this project related to a question or hypothesis. This is a search, not a full catalog, and it has no cursor.

Returns: { experiments: [{ id, project_id, name, hypothesis, start_date, end_date, variant_keys, control_variant_key, metadata, headline, processed_results, related_learning_ids, related_learnings, similarity, created_at, updated_at, source_url }] }

FieldTypeRequiredDescription
project_iduuidYesProject id from list_projects.
querystringYesNatural-language search text. 1–2000 characters.
limitintegerNoMax experiments to return. Default 10, max 50.

Function schema:

{
  "name": "query_experiments",
  "description": "Search a project's experiments by semantic similarity of the title and hypothesis. Returns the closest matches, not a full catalog. You need experiments in this project related to a question or hypothesis. This is a search, not a full catalog, and it has no cursor.",
  "parameters": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "project_id": {
        "type": "string",
        "format": "uuid",
        "description": "Project id from list_projects."
      },
      "query": {
        "type": "string",
        "description": "Natural-language search text. 1–2000 characters."
      },
      "limit": {
        "type": "integer",
        "description": "Max experiments to return. Default 10, max 50."
      }
    },
    "required": [
      "project_id",
      "query"
    ]
  }
}

Request:

{
  "project_id": "11111111-1111-4111-8111-111111111111",
  "query": "shipping estimate",
  "limit": 10
}

Response:

{
  "experiments": [
    {
      "id": "22222222-2222-4222-8222-222222222222",
      "project_id": "11111111-1111-4111-8111-111111111111",
      "name": "Cart shipping estimate",
      "hypothesis": "If we show an estimated shipping range on cart, checkout completion will go up because people stop getting surprised by cost at payment.",
      "start_date": "2026-03-01",
      "end_date": "2026-03-28",
      "variant_keys": [
        "control",
        "estimate"
      ],
      "control_variant_key": "control",
      "metadata": {
        "source": "posthog",
        "source_id": "cart-shipping-estimate"
      },
      "headline": {
        "metric": "Checkout completion",
        "variant_key": "estimate",
        "lift_relative": 7.2993,
        "p_value": 0.1389,
        "control_n": 24105,
        "variant_n": 24105
      },
      "processed_results": [
        {
          "metric": "Checkout completion",
          "variant_key": "estimate",
          "control_variant_key": "control",
          "control_n": 24105,
          "variant_n": 24105,
          "control_mean": 0.034101,
          "variant_mean": 0.03659,
          "lift_absolute": 0.002489,
          "lift_relative": 7.2993,
          "p_value": 0.1389,
          "z_score": 1.4799,
          "post_hoc_power": 32,
          "mde80_relative": 13.8182,
          "kind": "rate",
          "control_variance": 0.032939,
          "variant_variance": 0.035251
        }
      ],
      "related_learning_ids": [
        "44444444-4444-4444-8444-444444444444",
        "55555555-5555-4555-8555-555555555555"
      ],
      "related_learnings": [
        {
          "id": "44444444-4444-4444-8444-444444444444",
          "title": "Shipping estimates lift checkout completion",
          "summary": "Showing an estimated shipping range on cart raised checkout completion. People dropped off when cost appeared for the first time at payment.",
          "strength_of_evidence": 0.72,
          "source_url": "https://garasu.co/app/77777777-7777-4777-8777-777777777777/projects/11111111-1111-4111-8111-111111111111/learnings/44444444-4444-4444-8444-444444444444"
        }
      ],
      "source_url": "https://garasu.co/app/77777777-7777-4777-8777-777777777777/projects/11111111-1111-4111-8111-111111111111/experiments/22222222-2222-4222-8222-222222222222",
      "created_at": "2026-03-29T14:12:00.000Z",
      "updated_at": "2026-03-29T14:12:00.000Z",
      "similarity": 0.84
    }
  ]
}