Prompt authoring guide
1. Foundational mindset
Platform Agent ≠ vanilla ChatGPT
combo agents wield tools actively—retrieve KB chunks, paginate PDFs, author files, edit Office binaries—and ship with a Skill marketplace so domain procedures stay standardized.
| Dimension | Plain chat | combo-agent prompting |
|---|---|---|
| Knowledge | Memorized weights only | KB + uploads + historical artefacts |
| Task shape | Single turn typical | Multi-step pipelines |
| Artefacts | Chat text only | DOCX/XLSX/MD binaries |
| Depth | Generalist | Skill-augmented experts |
| Quality gates | Manual review only | Automated checks + ES verification loops |
Longer ≠ better
Ten techniques appear below—many jobs never need them all. Agents plan reasonably well; terse instructions often suffice.
Minimal examples that usually work:
Tighten prompts only when you observe repeatable misses (skipped documents, sloppy numbering, missing citations, unstable progress tracking).
Principle: start concise, iterate surgically—this chapter is your toolbox, not mandatory boilerplate each time.
2. Skill system primer
What is a Skill?
A Skill packages professional workflows (SKILL.md + tooling). Prefix messages with /skill-name so the orchestrator adopts that playbook.
Frequently used Skills
| Skill | Invocation | Purpose |
|---|---|---|
| document-editing | /document-editing | KB-aware partial edits |
| docx | /docx | Author/edit Word binaries |
| patent-agent | /patent-agent | Draft filings from disclosures |
| patent-doc-formatter | /patent-doc-formatter | Patent-office formatting |
Combining Skills
Typical pairing:
| Skill | Responsibility |
|---|---|
| document-editing | KB search → pinpoint blocks → snapshot updates |
| docx | Low-level XML/word processing |
When to activate Skills
| Task | Need Skill? |
|---|---|
| Read-only analysis/reporting | Optional—search + execute_code may suffice |
| Patch KB-hosted Office files | Yes /document-editing + /docx |
| Create brand-new Word deliverables | /docx |
| Patent workflows | /patent-agent / /patent-doc-formatter |
3. Ten core techniques — read me first
Not every bullet below belongs in every ticket. Severity codes:
| Tag | Meaning | When it matters |
|---|---|---|
| 🔴 Mandatory | Skipping commonly breaks correctness | Precision rules, binary edits, chained tasks |
| 🟡 Recommended | Big quality lift for heavy programs | Huge doc sets, audits, production prompts |
| 🟢 Optional | Nice-to-have polish | Exploratory one-offs, compact corpora |
Heuristics:
- Two or three modest documents — a crisp paragraph plus KB naming is typically enough for the planner.
- 10+ artefacts or 50+ page tomes — layer in phasing, indices, checkpoints.
- Numbering / formatting / hyperlinks — spell mechanics explicitly or the Agent improvises.
Technique 1 — Summaries as indices, then drill down 🟡
Detail calibration: skip the index for two or three short documents. Build it when you have five or more sources or any single artefact beyond ~50 pages.
Pain: dozens of 50+ page PDFs cannot fit one context window; “compare everything” collapses.
Flow:
- Paginate each source, emit a table of “entry name / module / chunk_ids”.
- Later, call
list_chunks(chunk_ids=..., window=…)for targeted diffs.
Snippet:
Comparison pass:
Benefit: reproducible, auditor-friendly diffs instead of lossy paraphrases.
Technique 2 — Phased execution + checkpoints 🟡
Pain: long jobs die mid-flight—work is lost without intermediate artefacts.
Flow: name explicit phases, write_file after each milestone, read_file before the next.
Snippet:
Maintain a TODO table with ✅/⏳ and “Completed M/N cohorts” breadcrumbs.
Technique 3 — Lateral extraction across N docs 🟡
Pain: heterogeneous structures hide the “same” capability across sources.
Steps:
- Pick the richest document as anchor.
- For every anchor row,
search/list_chunkssibling corpora. - Reverse scan for rows missing on the anchor → mark “new/supplement”.
Technique 4 — Discover taxonomies from data 🟢
Pain: automotive specs mix platform, E/E generation, powertrain, etc. Blind assumptions miss dimensions.
Directive: “List every classification axis you actually observe—do not hallucinate axes.” Provide examples as non-binding hints, then enforce comparisons only within identical axis values.
Technique 5 — Mandatory citations 🟡
Pain: models paraphrase without evidence.
Requirement: every factual claim lists document + chunk_id + verbatim snippet. If data missing, say so explicitly.
Benefits: auditability + reduced hallucination load.
Technique 6 — Control comparison grain 🟡
Pain: default answers stay at feature level; engineering needs signal/config parity.
Technique 7 — Binary edit loop (🔴)
Flow (document-editing/docx):
ES-first retrieval
| Need | Correct | Wrong |
|---|---|---|
| Find requirement text inside docx | search(query=..., doc_ids=...) | read_file whole binary |
| Diff two corpora | Scoped searches per artefact | Streaming entire files |
snapshot_and_index hygiene
Each revision pass must re-index; multi-step edits (“numbering → hyperlinks → styles”) each need their own snapshot.
Technique 8 — Chained tasks with explicit IO (🔴)
Document Task A outputs become Task B inputs.
Suffix conventions (_numbered, _linked) keep lineage obvious.
Technique 9 — Mechanical rules spelled out (🔴)
For numbering/mapping/normalization enumerate format • scope • exclusions • counters • exemplar before/after.
Without that structure the model improvises—in bulk edits improvisation is catastrophic.
Technique 10 — Post-edit ES verification 🟡
After automation, sample search anchors:
Deterministic asserts miss semantic linkage errors—Elasticsearch spot checks mimic human acceptance tests.
4. Prompt structure templates
Template A — Analysis / comparison (read docs → deliver a report)
Template B — Document editing (mutate KB-hosted files)
5. Common anti-patterns (prompt pitfalls)
Anti-pattern 0 — Editing documents without activating Skills
Without /document-editing, the Agent may read_file the binary (garbage), or rebuild the file from scratch (format loss).
Anti-pattern 1 — One-line vagueness
The model samples random paragraphs—coverage is undefined.
Anti-pattern 2 — Missing KB scope
Wide retrieval across every KB dilutes signal.
Anti-pattern 3 — No intermediate checkpoints
Any mid-run failure invalidates the downstream narrative.
Anti-pattern 4 — Memory-only diffing
Context compaction may erase the earlier chunks entirely.
Anti-pattern 5 — Unbounded comparison grain
You only get feature-level platitudes.
Anti-pattern 6 — Fragmented keyword search
Token splitting harms embedding quality.
6. Image / UI comparison add-ons
Use these when the job is screenshot or HMI parity review.
6.1 Build an image index before diffing
6.2 Descriptions must flow from describe_image
6.3 Structured comparison checklist
7. Platform tool quick reference
Useful primitives you can name directly inside prompts.
Retrieval (reading content)
| Action | Tool call | When to use |
|---|---|---|
| List KB documents | list_documents(kb_ids="Knowledge base name") | Discovery |
| Read a document end-to-end | list_chunks(doc_ids="Document ID") | Paginated deep read / index build |
| Fetch specific chunks | list_chunks(chunk_ids="id1,id2") | After you already know chunk IDs |
| Expand local context | list_chunks(chunk_ids="id", window=5) | Pull neighbours around a hit |
| Semantic search | search(query="Natural language…", kb_ids / doc_ids=…) | Fuzzy location |
| Vision | describe_image(image_url=…) | UI / plot screenshots |
Files (authoring / editing)
| Action | Tool call | When to use |
|---|---|---|
| Save intermediate notes | write_file → outputs/name.md | Checkpoints |
| Generate binary reports | execute_code (Python + openpyxl, etc.) | XLSX/DOCX outputs |
| Hydrate workspace copies | copy_kb_document(doc_id) | Before surgical edits |
| Refresh ES after edits | snapshot_and_index(parent_ws_doc_id, output_path) | ⚠️ Mandatory for re-search |
Skill triggers
| Scenario | Invocation |
|---|---|
| Edit KB-hosted Office files | /document-editing |
| Low-level Word operations / new docs | /docx |
| Patent drafting | /patent-agent |
| Patent-office export | /patent-doc-formatter |
8. Full worked examples
Example A — Multi-document requirements gap analysis (analytical)
Example B — Numbering + mutual hyperlinks (document editing)
9. Iterating on prompts
Preferred cadence: start small, add constraints only where the last run failed.
Concrete tightening tactics:
- Lead with ⚠️ where failure is common—models weight those lines strongly.
- Show positive + negative phrasing — e.g., “Don’t write ‘styles look similar’ ❌; instead ‘A uses rounded cards vs B uses squared lists’ ✅.”
- Cap batch size — e.g.,
Process at most five requirements per iterationwhen quality drops at scale. - Use heavy separators (
━━━,═══) between phases so boundaries stay obvious. - Avoid constraint dumps — fix one or two failure modes per iteration; over-constraining causes new omissions.