Jump to content

Righting Sentences AI - Future Development Plans

From Saxton Publishing Technical Documentation
Revision as of 15:28, 2 January 2026 by Saxtonmd77 (talk | contribs) (Created page with "= Future Development Plans = This page tracks proposed features, architectural changes, and improvements for the "Righting Sentences" application. Items are listed in no particular order of priority. * **Migrate Framework to FastAPI:** Refactor the current Flask backend to FastAPI to improve performance and leverage modern async capabilities, preparing for a "headless" architecture. * **Implement "Deep Chat" Frontend:** Replace the current HTML/CSS frontend with the op...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Future Development Plans

This page tracks proposed features, architectural changes, and improvements for the "Righting Sentences" application. Items are listed in no particular order of priority.

  • **Migrate Framework to FastAPI:** Refactor the current Flask backend to FastAPI to improve performance and leverage modern async capabilities, preparing for a "headless" architecture.
  • **Implement "Deep Chat" Frontend:** Replace the current HTML/CSS frontend with the open-source "Deep Chat" React component to support rich chat features, file uploads, and markdown rendering.
  • **Create "Editorial Logic" Python Module:** Consolidate all style rules into a single `editorial_logic.py` file, replacing `banned_words.txt` and Vale.
  • **Add "Triad" Detection Logic:** Update editorial logic to detect and flag sentences using the "X, Y, and Z" (three adjectives/verbs) structure.
  • **Add "Negative-Positive" Structure Detection:** Update editorial logic to flag "It's not X, it's Y" sentence structures.
  • **Expand Banned Words List:** Add new editorial constraints (e.g., "delve", "tapestry", "landscape") to the Python logic.
  • **Establish Google Cloud Storage Data Pipeline:** Create a mechanism to log "Bad Prompt" + "Good Correction" pairs as JSONL files in a Google Cloud Storage bucket (`saxton-training-data`).
  • **Implement "The Tap" (Silent Logging):** Add middleware to `main.py` that silently runs editorial logic on every model response and logs violations to the bucket without user intervention.
  • **Switch to Google Native Authentication (IAM):** Remove API keys for Gemini; transition to using Google Cloud Service Account permissions (Vertex AI User role).
  • **Implement Cloud Run Native SSO:** Configure Cloud Run to "Require Authentication" and manage access via IAM "Cloud Run Invoker" roles (initially manual list, later IAP).
  • **Transition to Vertex AI Models:** Set Gemini 1.5 Flash (or Pro) as the default model, accessed via the `vertexai` library instead of `google-generativeai`.
  • **Add Firestore for Chat Memory:** Implement a Google Cloud Firestore database to store conversation history, allowing the model to remember context (stateful chat).
  • **Enable Document Parsing:** Add `python-docx` to the backend to parse uploaded Word documents and inject their content into the model's context window.
  • **Implement Session Management:** Update the backend to handle `session_id` to persist conversations across browser refreshes using Firestore.
  • **Adopt "Strangler Fig" Deployment Pattern:** Deploy major updates (e.g., v3.0) to fresh Cloud Run instances while keeping legacy versions active but deprecated to ensure seamless migration.
  • **Security Hardening:** Remove all direct, public links to the active application from public-facing documentation/wikis to prevent bot traffic.
  • **Long-Form Content Agent:** Develop a "Chain of Prompting" workflow (Outline -> Section-by-Section generation) to overcome model laziness in 2,000+ word requests.
  • **Fine-Tuning Strategy:** Plan to use data collected from GPT-4o (Teacher) via "The Tap" to fine-tune a Gemini Flash model (Student) on Vertex AI.
  • **Hybrid Development Workflow:** Maintain the ability to run the application locally (MacBook) using `gcloud auth application-default login` for cost-free development and data collection.