← all conversations

Create system prompt workflow

2025-12-132 turns5,954 charsgpt-5-2
notebooklmmcp-serverpersona-generation

Summary

The user wants to build an application that uses NotebookLM's MCP server to CRUD notebooks and generate personas from them.

Messages

I want to create an application that does the following. I want to input to CRUD a NotebookLM notebook and be able to access it using the NotebookLM MCP server. I want to then generate a persona from the notebook. This is done with a simple query to Notebook LM which asks the notebook to generate a persona which is simply a list of attributes with weights. I will provide the blank schema for the persona. So it will just ask that with the example schema, then NotebookLM will return back that Schema with the populated values. Now I need to take that Schema and do an LLM call using llama.cpp with the local model I am running. It will simple take that schema and generate a system prompt which is simply a paragraph which will inform an LLM how to act. The purpose is to take the Notebook and to generate a system prompt from it which will allow you to write in the style of the notebook or to have the ability to generate at with the llama.cpp llm whatever you want with this new persona. I have a fully functional chatbot, with the ability to use the NotebookLM MCP server, CRUD for NotebookLM and ability to use a system prompt with the llama.cpp. What is missing is this streamlined workflow of taking a Notebook and creating a system prompt from it. I would like that new prompt to be populated with the rest of them. So I have the project in the root, I have the schema.json with the sample schema. Please write a prompt for CLIne which will transform this chatbot to have this functionality.
Below is a **single, copy-pasteable CLIne prompt** designed to transform your existing chatbot into a **Notebook → Persona → System Prompt pipeline**, without re-architecting what already works. This prompt assumes: - You already have: - CRUD for NotebookLM notebooks - Access to the NotebookLM MCP server - A llama.cpp-backed local LLM - Support for system prompts in your chatbot - The repo root contains `schema.json` (the blank persona schema) The prompt is written to be **implementation-oriented**, explicit about files, flow, and constraints, while still letting the agent reason and refactor safely. --- ## CLIne Prompt > **Goal** > Extend the existing chatbot to support a streamlined workflow that converts a NotebookLM notebook into a reusable system prompt persona, without breaking existing functionality. > > --- > > **High-level behavior to add** > > 1. A user selects an existing NotebookLM notebook (already supported via CRUD). > 2. The system sends a single structured query to the NotebookLM MCP server: > - The query provides `schema.json` as an example schema. > - The query instructs NotebookLM to populate the schema *only* with attribute weights inferred from the notebook. > - The response must be valid JSON matching the schema. > 3. The returned populated schema is stored as a first-class artifact (e.g. `persona/<notebook_id>.json`). > 4. The populated schema is passed to the local llama.cpp model in a second LLM call. > 5. The local model generates: > - A **single-paragraph system prompt** > - No entities, no instructions, no meta commentary > - Pure behavioral essence derived from the schema values > 6. That generated system prompt is: > - Saved (e.g. `system_prompts/<notebook_id>.txt`) > - Automatically selectable and usable by the chatbot like any other system prompt > > --- > > **Constraints** > > - Do NOT change existing NotebookLM CRUD or MCP integration behavior. > - Do NOT hardcode schema fields; always load from `schema.json`. > - NotebookLM is responsible ONLY for schema population. > - llama.cpp is responsible ONLY for turning a populated schema into prose. > - No extra LLM calls beyond the two-step pipeline. > - All outputs must be deterministic, structured, and reusable. > > --- > > **Implementation requirements** > > ### 1. Add a Persona Generation Pipeline > > Create a new workflow module (or equivalent) that orchestrates: > > ``` > Notebook → NotebookLM(schema fill) → persona.json → llama.cpp → system_prompt.txt > ``` > > This pipeline must be callable from both: > - CLI > - Existing chatbot UI (where system prompts are selected) > > --- > > ### 2. NotebookLM Prompt Construction > > Construct the NotebookLM query dynamically: > > - Load `schema.json` > - Inject it verbatim into the prompt > - Use clear instructions: > - “Populate this schema based on the notebook” > - “Return only valid JSON” > - “Do not add or remove fields” > > The response must be validated against the schema before continuing. > > --- > > ### 3. System Prompt Synthesis (llama.cpp) > > Feed the populated schema into llama.cpp with a fixed internal prompt that: > > - Produces exactly one paragraph > - Describes behavioral tendencies, tone, cognition, and style > - Avoids: > - Proper nouns > - Roles > - Instructions > - Mentions of weights, schemas, or analysis > > The output should read like a distilled personality essence. > > --- > > ### 4. Persistence & Reuse > > - Store persona schemas separately from system prompts. > - Allow regeneration of system prompts from the same persona without re-querying NotebookLM. > - Allow the chatbot to switch to the generated system prompt exactly like existing ones. > > --- > > **Deliverables** > > - New pipeline code wired into the existing project > - Minimal UI/CLI surface to trigger persona generation > - Clear separation of: > - NotebookLM schema extraction > - Local persona-to-prompt synthesis > > --- > > **Do not add new features beyond this scope.** > Focus on correctness, composability, and clean integration with the current architecture. --- If you want, next I can: - Tighten this further to **exact file paths and function signatures** - Convert it into a **task-by-task agent plan** - Write the **exact internal llama.cpp prompt** used for schema → paragraph - Or help you design the **persona cache/versioning strategy** Just tell me which layer you want to lock down next.
gpt-5-2