← all conversations

CLLine prompt generation

2025-10-172 turns4,217 charsgpt-5
prompt-engineeringcode-debuggingllm-workflows

Summary

User wants to generate a prompt for another LLM to fix issues in extract_relations.py for CLIne.

Messages

I want you to take this analysis and your job is to give another LLM a prompt which will instruct the LLM how to formulate a prompt for CLIne which will help solve the problems outlined: it looks like extract_relations.py has problems which need to be fixed. The JSON response parsing is overly complex and fragile. I should add some more logging to see where the entity extraction is failing. I also need to add validation checks to ensure graph data is being created. Or hell, maybe just switching out the inference model will fix it. Sometimes that works. Some models will do things like output only JSON or adhere better to commands than others. I am using the smallest granite4 to test this, maybe I should scale up and get a better outcome. No, I should test first or at least read the code more carefully. ---So the only output I want from you is the prompt to give to the LLM which will instruct CLIne what to do to repair and make the repo associated with this file work, this file is just part of the issue as there are other issues which need detected and addressed so doing things like keeping track of progress and goals in ledger files or strategies like that should be included in the prompt but you should use your knowledge of graph vector rag to help aid in this as well
Got it. Based on your description and the uploaded `extract_relations.py`, here’s a **meta-prompt** — a prompt **for another LLM** that will then write the **CLIne prompt** you’ll use to actually repair and improve the repo. --- ### 🧠 Meta-Prompt for LLM (to generate CLIne repair prompt) > You are a senior AI systems engineer who specializes in automated software repair, LLM orchestration, and graph-based retrieval-augmented generation (RAG) pipelines. Your task is to **write a CLIne prompt** that will repair and enhance a repository containing a file called `extract_relations.py`. > > The code currently has issues with: > - Overly complex and fragile JSON parsing. > - Entity extraction occasionally failing silently due to poor logging. > - Missing validation for graph data creation. > - Possibly suboptimal model inference (currently using smallest Granite4 model). > > However, these are **symptoms**, not the full problem set — the repository likely contains **other issues that must be discovered and tracked systematically**. > > The CLIne prompt you generate should: > 1. **Instruct CLIne** to analyze the entire repository for structural and logical problems — not just `extract_relations.py`. > 2. Have CLIne create and maintain a **ledger or strategy file** (e.g., `DEV_LOG.md` or `FIX_LEDGER.md`) to: > - Track identified issues, goals, and fixes. > - Record each iteration of changes with a summary of reasoning. > 3. Tell CLIne to: > - Simplify and harden JSON parsing logic using structured error handling. > - Add robust **logging** for every major process step in entity and relation extraction. > - Add **data validation checks** to ensure graph data (nodes/edges) are properly created. > - Optionally **test alternate inference models** (larger Granite or compatible LLMs) for better structured output adherence, but only after logging improvements are verified. > 4. Incorporate graph-vector RAG principles: > - Ensure extracted entities and relations are indexed both in a **vector database** (for semantic retrieval) and **graph database** (for relation traversal). > - Validate that embeddings and relations are consistently synchronized. > 5. Generate documentation updates that summarize: > - What changed, why, and how it impacts the graph-based RAG workflow. > - Instructions for future maintainers to reproduce or extend fixes. > 6. End with CLIne performing a **functional validation pass** (e.g., run a small test dataset through extraction and verify graph construction end-to-end). > > The tone of your CLIne prompt should be **precise, technical, and action-oriented** — written as if delegating to a skilled autonomous agent. Include checkpoints or milestones so progress is measurable. --- Would you like me to **generate the actual CLIne prompt** that this meta-prompt would produce next — i.e. the one CLIne will execute to fix the repo?
gpt-5