Extract key facts as bullet points
{
"content": "./meeting-notes.md",
"format": "bullets"
}Extracts key facts from text, files, and URLs in configurable output formats.
| Field | Type |
|---|---|
| content | string |
| format? | string |
| maxItems? | number |
| instruction? | string |
| Field | Type |
|---|---|
| extraction | string |
| format | string |
| chunks | number |
| model | string |
{
"content": "./meeting-notes.md",
"format": "bullets"
}{
"content": "https://example.com/brief",
"format": "json"
}{
"content": "paste text here",
"format": "bullets",
"maxItems": 5,
"instruction": "Prioritize legal and financial risk facts."
}Extracts key facts from text, files, and URLs into configurable formats. Handles long documents automatically via chunk extraction and merge. This code is yours - edit it freely.
arrey extract ./notes.md
arrey extract ./notes.md --format json
arrey extract https://example.com/brief --format table
arrey extract "paste text here" --format bullets --maxItems 5
import { arrey } from 'arrey'
const result = await arrey.run('extract', {
content: './research.md',
format: 'json'
})
console.log(result.extraction)
import { extract } from './arrey/tools/extract'
const result = await extract({
prompt: './research.md',
format: 'json',
temp: 0.2,
model: 'gpt-4.1-mini'
})
console.log(result.extraction)
import { arrey } from 'arrey'
import { extract } from './arrey/tools/extract'
const tools = await arrey.toVercelAIFrom([extract])
| Format | Output |
|---|---|
bullets | 5-10 concise factual bullets |
json | JSON array of facts with confidence labels |
table | Markdown table (`Fact |
custom | Whatever you define in prompt.ts -> formats.custom |
Edit prompt.ts -> chunk and combine.
Edit prompt.ts -> formats.
Pass maxItems at runtime:
arrey extract ./contract.md --format bullets --maxItems 3
Set in arrey.config.yaml:
tools:
extract:
provider:
model: gpt-4o
| File | Purpose | Edit frequency |
|---|---|---|
prompt.ts | Prompts and output formats | Often |
index.ts | Execution, chunking, merge behavior | Sometimes |
manifest.json | Metadata and I/O schema | Rarely |
README.md | This file | Optional |