@duckmind/deepquark-darwin-arm64 0.9.83 → 0.9.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.deepquark/skills/bundled/knowledge-graph/SKILL.md +385 -0
- package/.deepquark/skills/bundled/knowledge-graph/STANDARDS.md +461 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/cli.ts +588 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/config.ts +630 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/connection-profile.ts +629 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/container.ts +756 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/mcp-client.ts +1310 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/output-formatter.ts +997 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/token-metrics.ts +335 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/transformation-log.ts +137 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/wrapper-config.ts +113 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/.env.example +129 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/compare-embeddings.ts +175 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/config-falkordb.yaml +108 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/config-neo4j.yaml +111 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/diagnose.ts +483 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-falkordb-dev.yml +146 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-falkordb.yml +151 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j-dev-local.yml +161 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j-dev.yml +161 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j.yml +169 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-production.yml +128 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-test.yml +10 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose.yml +84 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/entrypoint.sh +40 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/install.ts +2054 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose-falkordb.yml +78 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose-neo4j.yml +88 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose.yml +83 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-all-llms-mcp.ts +387 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-embedding-models.ts +201 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-embedding-providers.ts +641 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-graphiti-model.ts +217 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-correct.ts +141 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-llms-mcp.ts +386 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-models.ts +173 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-llama-extraction.ts +188 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-final.ts +240 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-live.ts +187 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-session.ts +127 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-model-combinations.ts +316 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-ollama-models.ts +228 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-openrouter-models.ts +460 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-real-life-mcp.ts +311 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-search-debug.ts +199 -0
- package/.deepquark/skills/bundled/knowledge-graph/tools/Install.md +104 -0
- package/.deepquark/skills/bundled/knowledge-graph/tools/README.md +120 -0
- package/.deepquark/skills/bundled/knowledge-graph/tools/knowledge-cli.ts +996 -0
- package/.deepquark/skills/bundled/knowledge-graph/tools/server-cli.ts +531 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/BulkImport.md +514 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/CaptureEpisode.md +242 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/ClearGraph.md +392 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/GetRecent.md +352 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/GetStatus.md +373 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/HealthReport.md +212 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/InvestigateEntity.md +142 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/OntologyManagement.md +201 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/RunMaintenance.md +302 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchByDate.md +255 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchFacts.md +382 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchKnowledge.md +374 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/StixImport.md +212 -0
- package/bin/deepquark +0 -0
- package/package.json +1 -1
- package/.deepquark/skills/bundled/ge-payroll/SKILL.md +0 -153
- package/.deepquark/skills/bundled/ge-payroll/evals/evals.json +0 -23
- package/.deepquark/skills/bundled/ge-payroll/references/pain-points-improvements.md +0 -106
- package/.deepquark/skills/bundled/ge-payroll/references/process-detail.md +0 -217
- package/.deepquark/skills/bundled/ge-payroll/references/raci-stakeholders.md +0 -85
- package/.deepquark/skills/bundled/ge-payroll/references/timeline-mandays.md +0 -64
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
# Bulk Import Workflow
|
|
2
|
+
|
|
3
|
+
**Objective:** Import multiple documents or knowledge sources into the knowledge graph in a single operation for rapid knowledge base population.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Step 1: Announce Workflow
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
~/.claude/Tools/SkillWorkflowNotification BulkImport MadeinozKnowledgeSystem
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**Output to user:**
|
|
14
|
+
```
|
|
15
|
+
Running the **BulkImport** workflow from the **MadeinozKnowledgeSystem** skill...
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 2: Identify Import Sources
|
|
21
|
+
|
|
22
|
+
**Determine what to import:**
|
|
23
|
+
|
|
24
|
+
**File-Based Sources:**
|
|
25
|
+
- Markdown files (.md)
|
|
26
|
+
- Text files (.txt)
|
|
27
|
+
- JSON datasets (.json)
|
|
28
|
+
- Code repositories
|
|
29
|
+
- Documentation folders
|
|
30
|
+
- Note exports (Obsidian, Notion, etc.)
|
|
31
|
+
|
|
32
|
+
**Content Types:**
|
|
33
|
+
- Project documentation
|
|
34
|
+
- Meeting notes
|
|
35
|
+
- Research papers
|
|
36
|
+
- Technical specifications
|
|
37
|
+
- Personal notes
|
|
38
|
+
- Code documentation
|
|
39
|
+
- Wiki content
|
|
40
|
+
|
|
41
|
+
**Get from user:**
|
|
42
|
+
1. Source paths or URLs
|
|
43
|
+
2. File patterns (e.g., `*.md`, `docs/**/*`)
|
|
44
|
+
3. Any metadata or context to add
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Step 3: Plan Import Strategy
|
|
49
|
+
|
|
50
|
+
**Assess import scope:**
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
📋 **Import Plan**
|
|
54
|
+
|
|
55
|
+
**Sources Identified:**
|
|
56
|
+
- [X] markdown files
|
|
57
|
+
- [Y] text files
|
|
58
|
+
- [Z] JSON files
|
|
59
|
+
|
|
60
|
+
**Estimated Episodes:** [Total file count]
|
|
61
|
+
**Estimated Processing Time:** [File count × ~10 seconds]
|
|
62
|
+
|
|
63
|
+
**Recommended Approach:**
|
|
64
|
+
[Batch size and parallelization strategy]
|
|
65
|
+
|
|
66
|
+
⚠️ **Warning:** Large imports may consume significant API tokens and take considerable time.
|
|
67
|
+
|
|
68
|
+
Proceed with import? (Type "yes" to continue)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Batch Size Recommendations:**
|
|
72
|
+
- Small import (<50 files): Process all at once
|
|
73
|
+
- Medium import (50-200 files): Batches of 50
|
|
74
|
+
- Large import (>200 files): Batches of 100
|
|
75
|
+
|
|
76
|
+
**Concurrency Consideration:**
|
|
77
|
+
- SEMAPHORE_LIMIT controls parallel processing
|
|
78
|
+
- Lower limit = slower but fewer API errors
|
|
79
|
+
- Higher limit = faster but may hit rate limits
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Step 4: Prepare File List
|
|
84
|
+
|
|
85
|
+
**Collect files to import:**
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Find files by pattern
|
|
89
|
+
find /path/to/source -name "*.md" -type f
|
|
90
|
+
|
|
91
|
+
# Or from specific directory
|
|
92
|
+
ls /path/to/docs/*.md
|
|
93
|
+
|
|
94
|
+
# Or recursive
|
|
95
|
+
find /path/to/project -type f \( -name "*.md" -o -name "*.txt" \)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Create import manifest:**
|
|
99
|
+
```typescript
|
|
100
|
+
const importManifest = [
|
|
101
|
+
{
|
|
102
|
+
path: "/path/to/file1.md",
|
|
103
|
+
name: "Descriptive Episode Name",
|
|
104
|
+
source_description: "Project documentation"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
path: "/path/to/file2.md",
|
|
108
|
+
name: "Another Episode Name",
|
|
109
|
+
source_description: "Meeting notes"
|
|
110
|
+
}
|
|
111
|
+
// ... more files
|
|
112
|
+
];
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Step 5: Execute Import Batches (CLI-First, MCP-Fallback)
|
|
118
|
+
|
|
119
|
+
### Primary: Knowledge CLI (via Bash)
|
|
120
|
+
|
|
121
|
+
**ALWAYS try CLI first for each file - it's more reliable:**
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# For each file in the batch
|
|
125
|
+
bun run ~/.claude/skills/Knowledge/tools/knowledge-cli.ts add_episode "Episode Title" "$(cat /path/to/file.md)" "Imported from /path/to/file.md"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**For scripted batch imports:**
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Process files in a directory
|
|
132
|
+
for file in /path/to/docs/*.md; do
|
|
133
|
+
title=$(basename "$file" .md)
|
|
134
|
+
content=$(cat "$file")
|
|
135
|
+
bun run ~/.claude/skills/Knowledge/tools/knowledge-cli.ts add_episode "$title" "$content" "Imported from $file"
|
|
136
|
+
sleep 2 # Rate limiting
|
|
137
|
+
done
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Fallback: MCP Tool (Only if CLI fails)
|
|
141
|
+
|
|
142
|
+
**⚠️ Only use MCP if CLI returns connection/execution errors.**
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
// For each batch of files
|
|
146
|
+
for (const batch of batches) {
|
|
147
|
+
for (const file of batch) {
|
|
148
|
+
// Read file content
|
|
149
|
+
const content = await readFile(file.path);
|
|
150
|
+
|
|
151
|
+
// Create episode via MCP (fallback)
|
|
152
|
+
await add_episode({
|
|
153
|
+
name: file.name || generateNameFromPath(file.path),
|
|
154
|
+
episode_body: content,
|
|
155
|
+
source_description: file.source_description || `Imported from ${file.path}`,
|
|
156
|
+
source: determineSourceType(file.path)
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Brief pause between batches to avoid rate limits
|
|
161
|
+
await sleep(2000);
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Source type detection:**
|
|
166
|
+
```typescript
|
|
167
|
+
function determineSourceType(path) {
|
|
168
|
+
if (path.endsWith('.json')) return 'json';
|
|
169
|
+
if (path.includes('meeting') || path.includes('conversation')) return 'messages';
|
|
170
|
+
return 'text'; // Default
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Step 6: Monitor Progress
|
|
177
|
+
|
|
178
|
+
**Track import progress:**
|
|
179
|
+
|
|
180
|
+
```markdown
|
|
181
|
+
📊 **Import Progress**
|
|
182
|
+
|
|
183
|
+
**Batch [X] of [Y]**
|
|
184
|
+
✓ Processed: [current] / [total] files
|
|
185
|
+
🔄 Current: [filename]
|
|
186
|
+
⏱️ Time: [elapsed] / [estimated]
|
|
187
|
+
|
|
188
|
+
**Success Rate:**
|
|
189
|
+
✓ Successful: [X]
|
|
190
|
+
✗ Failed: [Y]
|
|
191
|
+
⏳ Pending: [Z]
|
|
192
|
+
|
|
193
|
+
**API Usage:**
|
|
194
|
+
- Estimated tokens used: [X]
|
|
195
|
+
- Rate limit warnings: [Y]
|
|
196
|
+
|
|
197
|
+
[Progress bar: ████░░░░░░ 40%]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Handle failures gracefully:**
|
|
201
|
+
```typescript
|
|
202
|
+
try {
|
|
203
|
+
await add_episode({...});
|
|
204
|
+
successCount++;
|
|
205
|
+
} catch (error) {
|
|
206
|
+
failedCount++;
|
|
207
|
+
failures.push({
|
|
208
|
+
file: file.path,
|
|
209
|
+
error: error.message
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Step 7: Present Import Results
|
|
217
|
+
|
|
218
|
+
**Summarize import operation:**
|
|
219
|
+
|
|
220
|
+
```markdown
|
|
221
|
+
✅ **Bulk Import Complete**
|
|
222
|
+
|
|
223
|
+
**Import Summary:**
|
|
224
|
+
|
|
225
|
+
**Files Processed:** [Total]
|
|
226
|
+
- ✓ Successfully imported: [X]
|
|
227
|
+
- ✗ Failed: [Y]
|
|
228
|
+
- ⏭️ Skipped: [Z]
|
|
229
|
+
|
|
230
|
+
**Episodes Created:** [Successful count]
|
|
231
|
+
|
|
232
|
+
**Knowledge Added:**
|
|
233
|
+
- New Entities: [Approximate count]
|
|
234
|
+
- New Relationships: [Approximate count]
|
|
235
|
+
|
|
236
|
+
**Time Taken:** [Duration]
|
|
237
|
+
**Average Speed:** [Files per minute]
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
**Failed Imports:**
|
|
242
|
+
[If any failures, list them with error reasons]
|
|
243
|
+
|
|
244
|
+
1. [file path]
|
|
245
|
+
Error: [error message]
|
|
246
|
+
Suggestion: [how to fix]
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
**💡 Next Steps:**
|
|
251
|
+
|
|
252
|
+
1. **Verify Import Quality**
|
|
253
|
+
→ Use SearchKnowledge to test retrieval
|
|
254
|
+
→ Use GetRecent to see what was added
|
|
255
|
+
|
|
256
|
+
2. **Explore Your Knowledge**
|
|
257
|
+
→ Search for topics you just imported
|
|
258
|
+
→ Check relationships between concepts
|
|
259
|
+
|
|
260
|
+
3. **Fill Gaps**
|
|
261
|
+
→ Manually capture missing context
|
|
262
|
+
→ Add connections between episodes
|
|
263
|
+
|
|
264
|
+
🎉 Your knowledge base now has [X] episodes to work with!
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Best Practices
|
|
270
|
+
|
|
271
|
+
**File Organization:**
|
|
272
|
+
- Use descriptive filenames that become episode names
|
|
273
|
+
- Group related files together
|
|
274
|
+
- Include metadata in front matter if supported
|
|
275
|
+
- Clean up formatting before importing
|
|
276
|
+
|
|
277
|
+
**Content Preparation:**
|
|
278
|
+
- Remove duplicate content
|
|
279
|
+
- Fix broken links/references
|
|
280
|
+
- Add context where missing
|
|
281
|
+
- Standardize formatting
|
|
282
|
+
|
|
283
|
+
**Import Strategy:**
|
|
284
|
+
- Start with highest-value documents
|
|
285
|
+
- Import in priority order
|
|
286
|
+
- Test with small batch first
|
|
287
|
+
- Monitor API usage and rate limits
|
|
288
|
+
|
|
289
|
+
**Episode Naming:**
|
|
290
|
+
```typescript
|
|
291
|
+
// Good names
|
|
292
|
+
"PAI_Skill_Canonical_Structure"
|
|
293
|
+
"Graphiti_MCP_Server_Setup"
|
|
294
|
+
"Podman_Volume_Mounting_Procedure"
|
|
295
|
+
|
|
296
|
+
// Bad names
|
|
297
|
+
"doc1"
|
|
298
|
+
"import_12345"
|
|
299
|
+
"notes"
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Import Patterns
|
|
305
|
+
|
|
306
|
+
**Project Documentation:**
|
|
307
|
+
```typescript
|
|
308
|
+
// Import all markdown from a project
|
|
309
|
+
const docs = await find('/project/docs', '*.md');
|
|
310
|
+
docs.forEach(doc => {
|
|
311
|
+
add_episode({
|
|
312
|
+
name: doc.basename,
|
|
313
|
+
episode_body: doc.content,
|
|
314
|
+
source_description: `Project documentation: ${doc.path}`
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Meeting Notes:**
|
|
320
|
+
```typescript
|
|
321
|
+
// Import meeting notes with temporal context
|
|
322
|
+
const meetings = await find('/notes/meetings', 'meeting-*.md');
|
|
323
|
+
meetings.forEach(meeting => {
|
|
324
|
+
const date = extractDateFromFilename(meeting.name);
|
|
325
|
+
add_episode({
|
|
326
|
+
name: `Meeting: ${meeting.basename}`,
|
|
327
|
+
episode_body: meeting.content,
|
|
328
|
+
source_description: `Meeting notes from ${date}`,
|
|
329
|
+
reference_date: date
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
**Research Papers:**
|
|
335
|
+
```typescript
|
|
336
|
+
// Import academic papers or research
|
|
337
|
+
const papers = await find('/research/papers', '*.pdf.txt');
|
|
338
|
+
papers.forEach(paper => {
|
|
339
|
+
add_episode({
|
|
340
|
+
name: `Paper: ${paper.title}`,
|
|
341
|
+
episode_body: paper.content,
|
|
342
|
+
source_description: `Research paper: ${paper.authors}`
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
**Code Documentation:**
|
|
348
|
+
```typescript
|
|
349
|
+
// Import README files from code repositories
|
|
350
|
+
const readmes = await find('/projects', '*/README.md');
|
|
351
|
+
readmes.forEach(readme => {
|
|
352
|
+
const project = readme.dirname;
|
|
353
|
+
add_episode({
|
|
354
|
+
name: `${Project}_Documentation`,
|
|
355
|
+
episode_body: readme.content,
|
|
356
|
+
source_description: `Project README: ${project}`
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## Content Quality Tips
|
|
364
|
+
|
|
365
|
+
**Before Import:**
|
|
366
|
+
✅ Remove boilerplate text
|
|
367
|
+
✅ Fix broken formatting
|
|
368
|
+
✅ Standardize date formats
|
|
369
|
+
✅ Resolve broken links
|
|
370
|
+
✅ Add missing context
|
|
371
|
+
✅ Deduplicate content
|
|
372
|
+
|
|
373
|
+
**After Import:**
|
|
374
|
+
- Search for topics to verify retrieval
|
|
375
|
+
- Check entity extraction quality
|
|
376
|
+
- Identify gaps in coverage
|
|
377
|
+
- Manually add missing connections
|
|
378
|
+
- Update failed imports
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## Error Handling
|
|
383
|
+
|
|
384
|
+
**Common Import Failures:**
|
|
385
|
+
|
|
386
|
+
**File Not Readable:**
|
|
387
|
+
```markdown
|
|
388
|
+
Error: Cannot read file [path]
|
|
389
|
+
|
|
390
|
+
Solution: Check file permissions and encoding
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**Content Too Large:**
|
|
394
|
+
```markdown
|
|
395
|
+
Error: Episode body exceeds token limit
|
|
396
|
+
|
|
397
|
+
Solution: Split into multiple episodes
|
|
398
|
+
- Part 1: Overview and context
|
|
399
|
+
- Part 2: Technical details
|
|
400
|
+
- Part 3: Examples and usage
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**API Rate Limit:**
|
|
404
|
+
```markdown
|
|
405
|
+
Error: 429 Too Many Requests
|
|
406
|
+
|
|
407
|
+
Solution:
|
|
408
|
+
1. Reduce batch size
|
|
409
|
+
2. Increase delay between batches
|
|
410
|
+
3. Lower SEMAPHORE_LIMIT
|
|
411
|
+
4. Wait and retry failed imports
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
**Poor Entity Extraction:**
|
|
415
|
+
```markdown
|
|
416
|
+
Warning: Low entity extraction quality
|
|
417
|
+
|
|
418
|
+
Solution:
|
|
419
|
+
- Content may be too brief or vague
|
|
420
|
+
- Consider adding more context
|
|
421
|
+
- Split into more focused episodes
|
|
422
|
+
- Manually supplement with targeted captures
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## Performance Optimization
|
|
428
|
+
|
|
429
|
+
**Import Speed:**
|
|
430
|
+
|
|
431
|
+
```typescript
|
|
432
|
+
// Fast import (may hit rate limits)
|
|
433
|
+
SEMAPHORE_LIMIT: 20
|
|
434
|
+
Batch size: 100
|
|
435
|
+
Delay: 1s
|
|
436
|
+
|
|
437
|
+
// Balanced import (recommended)
|
|
438
|
+
SEMAPHORE_LIMIT: 10
|
|
439
|
+
Batch size: 50
|
|
440
|
+
Delay: 2s
|
|
441
|
+
|
|
442
|
+
// Safe import (slow but reliable)
|
|
443
|
+
SEMAPHORE_LIMIT: 5
|
|
444
|
+
Batch size: 25
|
|
445
|
+
Delay: 5s
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
**API Cost Estimation:**
|
|
449
|
+
|
|
450
|
+
Rough calculation:
|
|
451
|
+
- 1 page ≈ 500 tokens
|
|
452
|
+
- Processing ≈ 1000 tokens per page (LLM overhead)
|
|
453
|
+
- 100 pages ≈ 100,000 tokens ≈ $0.10 (gpt-4o-mini)
|
|
454
|
+
|
|
455
|
+
Budget accordingly for large imports.
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
## Alternative: Incremental Import
|
|
460
|
+
|
|
461
|
+
**Instead of bulk import, consider:**
|
|
462
|
+
|
|
463
|
+
```markdown
|
|
464
|
+
🔄 **Incremental Import Strategy**
|
|
465
|
+
|
|
466
|
+
Import documents gradually over time:
|
|
467
|
+
|
|
468
|
+
**Week 1:** Core documentation and procedures
|
|
469
|
+
**Week 2:** Meeting notes and decisions
|
|
470
|
+
**Week 3:** Research and references
|
|
471
|
+
**Week 4:** Archive materials
|
|
472
|
+
|
|
473
|
+
**Benefits:**
|
|
474
|
+
- Spreads API cost over time
|
|
475
|
+
- Allows quality checking between batches
|
|
476
|
+
- Knowledge graph evolves organically
|
|
477
|
+
- Can adjust strategy based on early results
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
## Post-Import Verification
|
|
483
|
+
|
|
484
|
+
**Quality Checks:**
|
|
485
|
+
|
|
486
|
+
```markdown
|
|
487
|
+
**Verify Import Success:**
|
|
488
|
+
|
|
489
|
+
1. **Search Test**
|
|
490
|
+
→ Search for key topics from imported docs
|
|
491
|
+
→ Check if results are relevant
|
|
492
|
+
|
|
493
|
+
2. **Recent Episodes Check**
|
|
494
|
+
→ Use GetRecent to see imports
|
|
495
|
+
→ Verify episode names are descriptive
|
|
496
|
+
|
|
497
|
+
3. **Relationship Check**
|
|
498
|
+
→ Use SearchFacts for key entities
|
|
499
|
+
→ Confirm relationships were created
|
|
500
|
+
|
|
501
|
+
4. **Coverage Review**
|
|
502
|
+
→ Are all major topics represented?
|
|
503
|
+
→ Any gaps that need filling?
|
|
504
|
+
|
|
505
|
+
If issues found, consider re-importing problematic content.
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
---
|
|
509
|
+
|
|
510
|
+
**Related Workflows:**
|
|
511
|
+
- `CaptureEpisode.md` - Manual import of individual items
|
|
512
|
+
- `GetRecent.md` - Verify what was imported
|
|
513
|
+
- `SearchKnowledge.md` - Test retrieval of imported knowledge
|
|
514
|
+
- `GetStatus.md` - Check system health before large import
|