AI-Driven News Prediction and Decision-Making TomorrowNews is an experimental open-source project that uses LangChain Agents and Azure OpenAI to generate speculative, AI-driven news predictions based on real-world events. The project aims to simulate decision-making for the future, providing a creative glimpse into what might happen in various sectors, such as politics, economy, society, and the environment.
By feeding real news as input, this project generates predictions and outcomes for the following day, creating speculative headlines and decisions related to global topics.
- Autonomous AI Predictions: Uses real-time news data to predict plausible future events.
- Generative AI Agents: Powered by Azure OpenAI, the system creates detailed and imaginative newspaper articles.
- Responsive HTML Layout: The final output is a beautifully designed newspaper page optimized for both desktop and mobile screens.
- Dynamic Image Generation: Incorporates AI-generated images that complement the headlines, ensuring a cohesive and engaging visual experience.
LangGraph is the backbone of this project, providing a stateful, multi-actor environment for building agent workflows. Key features of LangGraph include:
- Cycles and Branching: Allows the implementation of loops and conditionals within the application.
- Persistence: Saves the state of the application after each step, supporting error recovery and human-in-the-loop workflows.
- Human-in-the-Loop: Enables interruption of graph execution for human approval or edits.
- Streaming Support: Outputs are streamed as they are generated by each node.
- Integration with LangChain: Seamlessly integrates with LangChain and LangSmith for enhanced functionality.
The project leverages Azure OpenAI for generating news content and images. Using GPT-4, the AI models analyze current events and generate predictions for the next day's newspaper.
- News Feed Tool: Fetches the latest news to provide the AI with the necessary context for predictions.
- Image Generation Tool: Creates realistic images based on detailed prompts to enhance the newspaper's visual appeal.
- Agent Workflow: The agent processes the news feed, generates predictions, and formats the output into an HTML page. This process involves multiple iterations and decision-making steps to ensure high-quality content.
- News Collection: The system fetches the latest news every hour using the News Feed Tool.
- AI Analysis and Prediction: The generative AI agent analyzes the current news and predicts potential future events.
- Content Creation: The agent creates detailed articles and generates appropriate images using the Image Generation Tool.
- HTML Newspaper Generation: The content is formatted into an HTML page that resembles a traditional newspaper layout, complete with headlines, articles, and images.
- Output Delivery: The HTML page is ready to be rendered in a browser, providing users with a speculative look at tomorrow’s news.
Note: All content generated by this project is purely speculative, based on AI's interpretation of current events, and should not be viewed as factual or actual news predictions.
Live Demo You can view the live version of the project here: https://SandBoxes.Live/tomorrownews
This experimental project explores the potential of AI as an autonomous decision-maker for a virtual world. Using Azure OpenAI and a structured prompt-response loop, the system generates daily high-level decisions on critical areas such as economy, society, environment, and global politics. Each decision is designed to be realistic, impactful, and ethically informed, balancing immediate outcomes with long-term sustainability. The goal is to create an engaging and evolving narrative that demonstrates the capabilities of generative AI while inviting users to reflect on governance and the complexities of decision-making in a simulated world. Read more
I invite you to explore the very simple interface at https://SandBoxes.Live/genbox, where you can witness the AI’s daily decisions and follow the evolving narrative of this virtual world.
gunicorn --bind=0.0.0.0 --timeout 600 main:app