LangPost is an AI agent that creates a Linkedin post from a Linkedin newsletter article or any other blog post.
It utilizes the concept of Few Shot encoding. I have an example dataset that maintains a list of Linkedin Post corresponding to my Newsletter Articles. The dataset looks somewhat like this.
I have made the LLM model aware of these examples so that it can generate similar posts on the basis of the content. The key benefit of providing the personalized examples is that the LLM can learn from these examples and produce a Linkedin Post very similar to my writing style and habit.
The execution graph looks like this.
graph-execute_mod.mp4
We provide the model with the URL of the article and it generates a personalized Linkedin Post for me after learning through the above examples.
- Install Typescript: npm install typescript
- Install Dotenv: npm install dotenv
- Install LangChain libraries:
- npm install langchain
- npm install @langchain/community
- npm install @langchain/langgraph
- Use Prettier to format the codebase.
- Take a look at the langraph.json file to understand how it runs in LangGraph Studio.