Inspiration
The inspiration behind this project stems from the growing demand for timely and engaging content in the electric vehicle (EV) sector. As the EV market continues to expand, staying updated with the latest trends and news is crucial for businesses, media outlets, and enthusiasts alike. Our goal was to create an efficient, fully automated system capable of delivering high-quality articles, podcasts, and reels, all tailored to the evolving needs of modern editorial teams.
What it does
Our system is fully automated to generate article content, podcasts, and reels, covering a wide range of topics related to electric vehicles. By leveraging advanced AI and machine learning algorithms, we are able to streamline content creation, making it easier for editors to produce relevant, high-quality material in a fraction of the time it would take manually.
How we built it
The backend of our system is composed of various layers, described below:
Automatic Scraping: We begin by automatically scraping articles using Bing’s Search News APIs to stay updated with the latest content on electric vehicles.
Parsing RSS feeds: Our system processes provided RSS feeds to extract relevant data for content creation.
Initial Content Filtering: Articles are initially filtered to remove those that are not suitable for further processing. This layer overcomes challenges like dealing with cookie-based restrictions, adds, paywalls, and it interacts with OpenAI’s APIs to ensure relevance and quality.
Content Scoring: Each article is automatically scored based on the guidelines from Google's helpful content documentation. LLMs are used as judges to assess content on six quality metrics:
- Originality, Value, and Purpose
- Relevance and audience impact
- Up-to-Date Information in E-Vehicle Articles
- Clarity, Engagement and Structure
- Quality, Professionalism and Transparency
- Trust, Accuracy and Expertise
The model is asked to provide both a textual critique as well as a score (1-5) representing how aligned the article is to each dimension.
Second Filtering Step: Based on the scores from the previous step, articles that fail to meet the necessary standards are filtered out, ensuring that only high-quality content moves forward in the pipeline.
Text Summarization and Embedding: After summarizing the articles, we generate embeddings to represent the content in a more compact, machine-readable form. A custom greedy KNN algorithm is then applied to the embeddings to cluster similar articles into groups of three, with low dispersion within groups but high variance between groups. This encourages diversity and relevance in the generated content.
Content Generation: Starting from the selected group of three similar articles, we use Bing’s and OpenAI’s APIs to generate the final article. The pipeline is the following:
a) Automated Image Search and Selection: Images related to the topic are retrieved from Bing, and the most relevant one is selected.
b) Markdown Content Generation: The content from the three articles is combined to create a cohesive piece in markdown format.
Using textual reinforcement learning strategies, we optimize the system prompt with the help of the TextGrad such that the generated articles are in line with the aforementioned dimensions. Currently, we only use the LLM generated feedbacks to guide prompt learning, but in the future, we plan to integrate user feedback into this process for further alignment.Podcast Generation: We use the Play.ai API to convert the generated articles into podcasts, making the content accessible in audio form.
Reels Creation: The Creatomate.com API is used to generate dynamic video reels based on the selected images and summarized content, providing engaging video content for social media.
What we learned
- The power of automation: Automating content creation and distribution processes not only saves significant time but also ensures consistency in quality.
- Importance of data quality: Filtering and scoring articles is crucial for maintaining a high standard of content, and we’ve learned that fine-tuning this process is key to a successful solution.
- Prompt optimization is both challenging and rewarding: It’s fascinating to see how optimization of AI prompts can drastically improve the quality of the generated content.
- AI for multi-modal content generation: Leveraging both text and image generation capabilities in tandem creates a more holistic content production pipeline that resonates with a variety of audiences.
Challenges we ran into
Content Filtering: One of the biggest challenges was filtering large amounts of data. We had to filter over 70% of articles from RSS feeds and more than 50% of Bing-retrieved content. This required scraping a huge volume of articles to ensure the selection of the best content.
Clustering Information: Balancing the need for similarity within groups while ensuring topic diversity across generated articles was a major challenge. We needed to implement a custom greedy KNN algorithm to meet these requirements effectively.
Prompt Optimization: Tuning prompts for content generation using the TextGrad library posed technical challenges, linked to overfitting of the model on our defined textual reward. However, it was also one of the most interesting aspects of the project, as it involved a great deal of experimentation and learning.
Accomplishments that we're proud of
We are proud of the innovative approach we’ve developed to automate content creation across multiple formats (articles, podcasts, and reels). Our prompt optimization strategy, along with the content filtering and clustering pipelines, has been particularly successful in producing relevant prompts. We noticed however that it can overfit to the LLM judge, so it would be ideal to use real user's feedback instead or a mix of both. We are also pleased with how well the system integrates different AI tools to create a seamless experience from text to multimedia content.
Future directions: Inspect & News
Looking ahead, we plan to refine our reinforcement learning process by incorporating real user feedback, allowing us to further improve the quality of generated articles and prompts (RLHF). Additionally, we aim to explore ways to scale the system to handle an even larger volume of content while maintaining quality, and to enhance the system’s ability to adapt to emerging trends in the EV sector.
Built With
- bing-search-api
- creatomate.com
- fastapi
- newspaper3k
- openai
- play.ai-api
- python
- textgrad
Log in or sign up for Devpost to join the conversation.