|
3 | 3 | Pipeline leveraging LLM prompt caching: |
4 | 4 | Step 1: Build base context A (schema + document content). |
5 | 5 | Step 2: A → generate summary. |
6 | | - Step 3: A + summary → extract concept list. |
7 | | - Step 4: Concurrent LLM calls (A cached) → generate each concept page. |
8 | | - Step 5: Code writes all files, updates index, appends log. |
| 6 | + Step 3: A + summary → concepts plan (create/update/related). |
| 7 | + Step 4: Concurrent LLM calls (A cached) → generate new + rewrite updated concepts. |
| 8 | + Step 5: Code adds cross-ref links to related concepts, updates index. |
9 | 9 | """ |
10 | 10 | from __future__ import annotations |
11 | 11 |
|
|
50 | 50 | Return ONLY the Markdown content (no frontmatter, no code fences). |
51 | 51 | """ |
52 | 52 |
|
53 | | -_CONCEPTS_LIST_USER = """\ |
54 | | -Based on the summary above, identify the key concepts worth creating as \ |
55 | | -standalone wiki concept pages. |
56 | | -
|
57 | | -Existing concept pages: {existing_concepts} |
58 | | -
|
59 | | -Return a JSON array of objects, each with: |
60 | | -- "name": concept slug (e.g. "transformer-architecture") |
61 | | -- "title": human-readable title (e.g. "Transformer Architecture") |
62 | | -- "is_update": true if this concept already exists and should be updated |
63 | | -
|
64 | | -Only include concepts for significant themes. For the first document, \ |
65 | | -create 2-3 foundational concepts at most. Do NOT create concepts that are \ |
66 | | -just the document topic itself (e.g. don't create "machine-translation" \ |
67 | | -for a translation paper). |
68 | | -
|
69 | | -Return ONLY valid JSON array, no fences, no explanation. |
70 | | -""" |
71 | 53 |
|
72 | 54 | _CONCEPTS_PLAN_USER = """\ |
73 | 55 | Based on the summary above, decide how to update the wiki's concept pages. |
|
0 commit comments