needle_haystack_generate
ActiveTool of IA-QA — 130+ QA & Dev Tools for AI Agents
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?\")"
}
}
}No endpoints wrapped at confidence ≥ 0.70.
Parent server
IA-QA — 130+ QA & Dev Tools for AI Agents
https://github.com/jcjamet/ia-qa
1/7 registries