Batch process questions from a CSV file through Inkeep's AI service and export results with shareable links.
Use this to evaluate Inkeep's question-answering capabilities and share results with your team via the generated URLs or the Inkeep dashboard.
- Node.js v20+
- npm (or yarn/pnpm/bun)
-
Clone and install
git clone https://github.com/inkeep/process-questions-from-csv cd process-questions-from-csv npm install -
Configure environment variables
Copy
.env.exampleto.envand fill in your values:cp .env.example .env
Variable Required Default Description INKEEP_API_KEYYes - Your Inkeep API key SHARE_URL_BASE_PATHYes - Base URL for shareable links (e.g., https://share.inkeep.com/<orgAlias>/<sandboxId>)FILE_PATHNo ./inputs/questions.csvPath to input CSV TAGSNo - Comma-separated tags for filtering in the dashboard BATCH_SIZENo 2Number of questions per batch INKEEP_INTEGRATION_IDNo evaluationIntegration identifier (used in output filename) CHAT_MODENo - Chat mode setting -
Add your questions to
./inputs/questions.csv:question "How do I integrate Inkeep with my React application?" "What are the pricing options for Inkeep?" "Can Inkeep search through PDF documents?"A sample file is provided for reference. Quotes are required to maintain valid CSV format.
-
Run
npm start
This compiles the TypeScript and runs the script.
Results are written to ./outputs/ with the filename:
integration_<INKEEP_INTEGRATION_ID>-count_<count>-time_<timestamp>.csv
Output columns:
| Column | Description |
|---|---|
question |
Original question |
answer |
AI response (citations like [^1] are removed) |
view_chat_url |
Shareable link to view the conversation |
Example:
question,answer,view_chat_url
"What sources...","Inkeep supports...",https://share.inkeep.com/org/sandbox?conversationId=abc123&tags=tag1,tag2- Shareable links: Each response includes a URL to view the full conversation
- Dashboard integration: Use
TAGSto filter and group questions in the Inkeep Admin dashboard (including thumbs up/down feedback) - Citation stripping: Removes citation markers from answers for cleaner output
- Failure handling: Processing stops if more than 2 failures occur in a single batch
Questions are processed in batches (default: 2) to protect the service. Processing time scales with the number of questions.
Important: Contact help@inkeep.com before running batch tests so we can allow-list your organization for higher request rates.