Table of Contents (top down ↓)
Source Code of the Project on Github here ↓
Please visit this page for other projects - Source code here
See It in Action: From Ideas to HTML
Imagine you have a few scattered ideas for a blog post – perhaps just bullet points or loose concepts. Our system lets you input these ideas in any order. For instance, you provide a few brief concepts, and watch as the project transforms them into a well-structured HTML blog page right before your eyes.
The beauty of it lies in the "process framework" – it doesn't just write; it also proofreads, ensuring a polished final output. It's like having a dedicated writing assistant that not only drafts your content but also meticulously edits it, all within a single, streamlined flow.
Video Explanation
Please watch the following youtube video for an explanation of the source code:
Why ASP.NET Core Makes a Difference
While other examples might demonstrate similar concepts using a simpler console application, our project leverages ASP.NET Core. This choice is deliberate and significantly enhances the usefulness and real-world applicability of the system, allowing for a dynamic web interface rather than a static console output. It’s like comparing a simple command-line tool to a full-fledged web application – the latter offers a far richer and more accessible user experience.
Under the Hood: Key Technical Components
Let's peek under the hood at the project's setup. In the Program.cs file, you'll find some familiar configurations:
- Gemini API Key: You need to generate this key, which is essential for accessing the underlying AI models that power the content generation. (A link has been provided [» →Get your FREE Gemini AI Keys] to guide you through this process).
- Dependency Injection: We register a
'transient kernel'and a'process builder factory'to efficiently manage the lifecycle of our core components. - SignalR Integration: Crucially, we've integrated SignalR for real-time updates. Think of SignalR as a high-speed courier service that ensures instant communication between your web page and the server, delivering updates as they happen – a must-have for interactive applications where immediate feedback is paramount.
The project also includes other standard boilerplate code, which we assume is familiar territory for experienced developers.
The Engine Behind the Magic: The Process Builder
That was a quick look at the project in action. Now, let's pull back the curtain and understand the engine driving this creation: the Process Builder. This component orchestrates the entire workflow, acting like a maestro conducting an orchestra of tasks, ensuring each step is executed in the right sequence and with the right purpose.
At the heart of our Process Builder are several distinct "kernel steps," each with a specific role:
- Creator Step: This step generates the initial content. It takes your raw ideas and crafts them into a comprehensive draft.
- Proofreader Step: As the name suggests, this step rigorously checks the generated content for errors, grammatical inconsistencies, and adherence to quality standards.
- Proxy Step (Human in the Loop): This is a crucial innovation. It's designed to bring a human into the loop, allowing for manual review or intervention when needed. This step is particularly vital for adapting the system to frameworks like ASP.NET Core, where we can seamlessly integrate real-time human interaction. (A link will be provided [» →Human-in-the-Loop documentation on MSDN] for a deeper dive into the 'Human in the Loop' concept, as it involves some intricate details.)
Deeper Dive into the Steps
Next, let's examine the ProcessBuilderFactory class and, more specifically, the implementation of our key steps:
- The Creator Step: Within the source code, the
CreatorSteputilizes a carefully crafted prompt and a few kernel functions. While it might appear extensive at first glance, much of it involves repetitive lines, keeping the underlying logic surprisingly straightforward. We designed it to be effective without being overly complex. - The Proofreader Step: Following the creation, the
ProofreaderStepcomes into play. It, too, uses a specialized prompt designed to meticulously scan the generated content for errors, grammatical inconsistencies, or any deviations from desired quality. This step acts as your vigilant editorial eye.
Crucially, each kernel step maintains a "chat history," allowing the system to learn and refine its responses over successive iterations. After the ProofreaderStep evaluates the content, it makes a critical decision: if the response "meets expectations", the process moves forward to its final format.
However, if the content falls short, the system triggers a "recheck" and sends the task back to the Creator Step for revision. This creates an invaluable feedback loop, much like a meticulous human editor collaborating with a writer until the piece is perfect.
Visualizing the Workflow
To visualize this continuous flow, consider it a well-oiled machine:
- Process Start: Initiates the workflow.
- Creator Step: Generates the initial draft.
- Proofreader Step: Reviews the draft.
- If errors are found (
recheck is required): It sends the content back to theCreator Stepfor correction, iterating until quality is met. - If satisfactory (
end format): The process exits to an External Human in the Loop via an external message channel. This channel acts as the interface for human oversight, allowing you to fine-tune or approve the final output before it goes live.
- If errors are found (
You can find the source code for this entire project openly available on GitHub, and we will provide relevant links in the description. As this project is still in active development, we haven't yet integrated it into my official course materials, but you can track its progress on GitHub.
The User Interface: Simple Yet Powerful
Finally, the user-facing index page provides a simple, intuitive input field: "Write ideas in any order." Underneath this clean interface, JavaScript powers the front-end, handling AJAX communication for seamless data exchange and utilizing SignalR to deliver those real-time updates we discussed earlier.
That wraps up our overview of this dynamic, AI-driven content creation and proofreading system. We believe this process framework offers a powerful and flexible approach to automating and enhancing your blog article workflow. Thank you for exploring it with us!
This Blog Post/Article "(C# ASP.NET Core) Project on Proof Reading and Writing Blog Articles with ASPNET Core and AI Process Framework" by Parveen is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.