You're viewing a demo portfolio

Join the waitlist
PRSM

needle_haystack_generate

Active

Tool of IA-QA — 130+ QA & Dev Tools for AI Agents

declared in 1.0.0

Generate a "needle in a haystack" test: embeds a target fact into a large block of filler text at a specified position. Use this to test LLM context window retrieval accuracy. Returns the full haystack, the question to ask, and metadata. No API key needed.

Parameters schema

{
  "type": "object",
  "required": [
    "needle",
    "question"
  ],
  "properties": {
    "needle": {
      "type": "string",
      "description": "The fact to hide (e.g. \"The secret code is ALPHA-42\")"
    },
    "tokens": {
      "type": "integer",
      "default": 5000,
      "description": "Target haystack size in tokens (default: 5000, max: 100000)"
    },
    "position": {
      "enum": [
        "start",
        "middle",
        "end",
        "random"
      ],
      "type": "string",
      "default": "middle",
      "description": "Where to insert the needle: \"start\", \"middle\", \"end\", \"random\" (default: \"middle\")"
    },
    "question": {
      "type": "string",
      "description": "The question to ask the LLM (e.g. \"What is the secret code?\")"
    }
  }
}

What this tool wraps· 0 endpoints

min confidence0.700.50

No endpoints wrapped at confidence ≥ 0.50.

Parent server

IA-QA — 130+ QA & Dev Tools for AI Agents

https://github.com/jcjamet/ia-qa

1/7 registries
View full server →