I have generated a blog outline through an AI agent. It has 10 outlines (sentences). Now it generates the outline as a single paragraph. Now, please suggest to me how I can split the paragraph into sentences by sentences and store them sheet cell by cell.
Hey,
So, you can use output parser on the ai agent, and specify an example json to it, something like this
[
{ "outline": "1. Introduction to AI writing tools." },
{ "outline": "2. Benefits of using AI for content creation." },
{ "outline": "3. Key players in the industry." },
{ "outline": "4. How AI generates outlines." },
{ "outline": "5. Practical use-cases." },
{ "outline": "6. Challenges and limitations." },
{ "outline": "7. Ethical considerations." },
{ "outline": "8. Real-world examples." },
{ "outline": "9. Future trends." },
{ "outline": "10. Conclusion and next steps." }
]
This output parser tell the ai agent to output in json in that format.
Once you have added this to the example output parser json, it then good to explain in the system prompt to output the sentences into the json.
You can use js, too, but Iād recommend output parser.
Best regards,
Samuel
1 Like
Thanks a lot @King_Samuel_David . I will try this out. Thanks again for your help and quick response.
1 Like