Ankith Savio

Ghost Writer: Adapting STORM for real-world problems

Overview

Crafting tailored resume for specific job application can be challenging. While AI offers potential, generic templates or zero-shot prompting often lack the context-awareness needed to truly stand out. This limitation highlights a broader trend in AI: moving beyond simple zero-shot requests towards sophisticated AI Workflows and Agents that leverage tools in a constrained environment to iteratively reason and tackle complex, multi-step tasks far more effectively.

One tangential approach in this direction involves structured "research" before generation. The STORM framework, an open-source writing system designed to generate comprehensive Wikipedia-like articles by simulating multi-perspective research dialogues, exemplifies this. Inspired by STORM's methodology for building deep understanding, I explored its adaptation for a highly personalized use case: resume writing.

In this post, I'll detail how I adapted the core principles of STORM to analyse personal documents (like your resume and target job description). I chose resume writing because it's a tangible problem where AI-driven, context-aware guidance offers significant advantages over generic advice.

The result is Ghost Writer, an open-source Resume Advisor built on these principles. This post dives into the implementation details, explaining the modifications made to STORM and the architecture of the Ghost Writer system, offering insights for anyone building advanced, context-aware AI applications.

The Foundation: Understanding STORM

STORM (Synthesis of Topic Outlines through Retrieval and Multi-perspective Question Asking). STORM is an innovative AI system designed to generate comprehensive, Wikipedia-like articles. its main focus is on the pre-writing or research stage.

Instead of directly generating text, STORM orchestrates a simulated conversation. It creates multiple AI 'personas', each representing a different viewpoint or area of expertise related to a topic. These personas then engage in a dialogue with an 'expert' agent, asking questions to explore the topic thoroughly. This multi-perspective question-asking allows the system to gather diverse information, identify key sub-points, and build a deeper understanding before generating the final article, as shown below:

Image

STORM Workflow: Pre-Writing followed by the Writing Stage for Wikipedia-like articles. An example snippet from their paper.

This forms the basis for Ghost Writer. We adapt this powerful research simulation approach for a different, highly personalized task: tailoring a CV to a specific job description. Ghost Writer employs specialized 'resume advisor' personas (e.g., a technical expert, an HR perspective, etc) to analyse the user's input (resume, job description) and simulate a discussion to identify key areas for improvement. It aims to automate the strategic thinking required for effective resume customization, bridging the gap between zero-shot LLM prompts and expensive personalized resume writing services.

To achieve this, Ghost Writer integrates STORM's conversational framework with Retrieval-Augmented Generation (RAG) and targeted Web Search for company/role context, finally providing actionable advice through a User Interface.

How Ghost Writer Works

Image

Ghost Writer System Architecture

The workflow has three main phases detailed below:

  1. Create PortfolioKnowledgeBaseBuilder module

    In the first step this module processes the input documents and external sources to create structured profiles for both the "user" and the target "company".

    • Company Profile: Here we aim to go beyond just the job description, using targeted web searches to gather information on company values, recent news, and specific role requirements. This creates a richer understanding of the target context.

    • User Profile: Information is extracted from the user's provided documents (e.g., existing resume) to build a detailed portfolio of skills, experiences, and projects.

      This phase populates the system's knowledge base with the help of RAG.

  2. STORM OrchestrationStorm module

    This core phase adapts the STORM methodology to simulate a multi-persona review. This module orchestrates the simulation where the personas and the expert have a conversation in a loop:

    • Persona Generation: An LLM generates diverse 'resume advisor' personas relevant to the specific role and company (e.g., a hiring manager, an HR representative, etc). Each persona brings a unique viewpoint. See the image below for an example trace showing the prompt and resulting persona definitions.


Image

Trace snippet example of persona generation

- Question Generation: Each persona, guided by its specific role and the conversation history, asks targeted questions to the Expert agent. These questions aim to get information needed to provide relevant advice for tailoring the user's resume. the image below shows an example of a persona formulating a question.

** **

Image

Trace snippet example of questions generation

- Retrieval & Answer Generation:

Query Formulation: The persona's natural language question is broken down by an LLM into specific, structured queries suitable for retrieving information from the knowledge base from Phase 1. the image below **shows the question-to-query decomposition.

** **

Image

Trace snippet example of query generation

Contextual Answer Synthesis: The generated queries are used to get relevant sources from the knowledge base. The retrieved information is then provided as context to the Expert, who synthesizes a relevant answer to the persona's question, considering the conversation history. the image below **shows the Expert’s resulting answer.

** **

Image

Trace snippet example of answer generation

This conversational loop typically repeats for a set number of iterations or until personas indicate they have sufficient information. The core logic is captured in the pseudo-code below:

```python # Pseudo-code def storm(): conversations = [] topic = f"Resume Writing for the {role} role at {company}"

# Generate personas personas = get_personas(topic)

def conversation_simulation(persona): conv_history = [] max_iterations = 10

for _ in range(max_iterations): # Persona asks a question question = get_questions(topic, persona, conv_history) conv_history.append(question) # Generate search queries queries = get_search_queries(question) # Retrieve sources sources = query_knowledge_base(queries) # Expert generates answer answer = get_answers(topic, persona, conv_history, sources) conv_history.append(answer_obj)

return conv_history

for persona in personas: result = conversation_simulation(persona) conversations.append({"persona": persona, "conversation": result})

return conversations ```

  1. Report WritingWriterEngine.post_workflow module

    Finally, we analyse the complete conversation histories generated by each persona interaction. The module derives key insights, identifies actionable feedback, and synthesizes this information from the multiple personas into a single, structured, and meaningful draft report for the user, providing concrete suggestions for resume improvement.

Under the Hood

Ghost Writer was developed using the following key technologies, models, and services chosen to support its complex workflow while being able to run locally:

Result

Ghost Writer system successfully processes user inputs and generates detailed, structured reports aimed at guiding resume and cover letter optimization.

System Output:

Video Demonstration:

Workflow demo: uploading documents, system processing, and the generated report interface with specific suggestions for the resume and cover letter.

Future Work

While the system demonstrates the capability to generate these context-aware reports, a formal evaluation of the advice quality and its impact on resume effectiveness is a work in progress and will be detailed in my future blogs.

Summary

Ghost Writer represents a practical exploration into applying advanced AI workflow concepts, specifically adapting the research-oriented STORM framework, to the highly personalized challenge of resume and cover letter tailoring. By simulating a multi-persona analysis grounded in user documents and real-time web data, it moves beyond generic advice to offer structured, context-aware guidance aimed at empowering job seekers. The journey detailed in this post, from identifying the limitations of simpler AI approaches to implementing a AI workflow involving persona generation, iterative question-asking, RAG, and structured report synthesis, highlights the potential and the complexities of building sophisticated AI assistants. While the quality of the generated advice is yet to be evaluated rigorously, the current system demonstrates a functional pipeline for this complex task. Evaluation and its planning deserves its own post! I hope it serves as a useful tool or an example for developers and researchers interested in AI workflows, and applying these techniques to real-world problems.

Thank you for reading!

References