Langflow Micro Tutorials — Micro Tutorial Writer

Rodrigo Nader
Langflow
Published in
3 min readSep 24, 2023

--

Welcome back to our Langflow micro tutorials series! We’ll continue exploring simple Langflow examples, focusing on ideas and custom component design.

This article provides a download link for the described flow. Use it to modify and understand the components in use.

Today, we’ll focus on the flow I built for writing micro tutorial articles (yes, that’s what I’ve been using from the beginning of the series 😅). Hope you enjoy it!

Main Features

LLM Runner: Easily construct and execute a chain with no parameters.

Objective

The objective of this flow is to streamline the tutorial writing process by generating a Micro Tutorial based on rough descriptions of each section.

To explain it, let's start showing what we'll call the "Main Prompt Template":

This prompt asks the model to revise a given text by correcting grammar, ensuring conciseness and non-repetition, maintaining the original topics, and using neutral language, which is what I expect to be done with a draft version of a Micro Tutorial.

The flow utilizes custom components, such as Topic, Features, Feature Description, and Objective, as placeholders for plain text passing. They just receive the input text as parameters and return exactly the same text.

The Topic and Feature texts are directly inputted into the main Prompt Template, while Feature Description and Objective values undergo processing by a precursive LLM before being sent to the main Prompt Template.

The Prompt Template finally takes all these texts (both human and model-generated ones) and formats them into an article-like prompt to be once more reviewed by a GPT model through the LLM chain.

By automating the writing process, this flow cleans up my rough and quickly written blogs and converts them into a bit more refined ones. This is the result:

There's typically some polishing and extra parts to be written for that to become a proper article, which indicates that those components can definitely be improved, but hopefully, this is enough to demonstrate a creative way for Langflow to help with your writing!

Download Flow (gist)

--

--