Reduce system prompt token overhead from skill files

Aperta
#26 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
ai

Direzione di ricerca

Inspect load_all_skills() and the referenced mechanical-illustration-skill.txt and svg-shape-library.txt files, then measure the current skill-text token usage. Compare the suggested loading, trimming, and budget approaches; done means irrelevant skills are excluded for non-mechanical queries and the total skill text meets a defined target.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Priority: P1 | Source: PR #21 self-review (F2)

Problem

PR #21 adds ~9,150 tokens (75% increase) to the system prompt. load_all_skills() concatenates ALL .txt files unconditionally — mechanical diagram guidance is injected even for non-mechanical queries.

  • Pre-PR skill text: ~48.9 KB (~12,200 tokens)
  • Post-PR skill text: ~85.5 KB (~21,400 tokens)

Suggested Approaches

  • Conditional skill loading — only inject mechanical-illustration-skill.txt and svg-shape-library.txt when the query involves physical/mechanical subjects
  • Trim the shape library to the 6-8 most common shapes (as the issue proposal itself suggests)
  • Establish a token budget target for total skill text
Lingua principale
TypeScript
Stelle
1.6k
Fork
202
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CopilotKit/OpenGenerativeUI

Tutte le issue di CopilotKit/OpenGenerativeUI

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.