Auto-News

repository·main·Indexed 21 days ago

https://github.com/finaldie/auto-news

An LLM-powered news aggregator that automates the collection, summarization, and filtering of information from RSS, social media, and web sources, delivering results to a Notion-based interface. It supports multi-LLM integration (OpenAI ChatGPT, Google Gemini, Ollama) and provides features for insight generation, noise reduction, and weekly recaps. The backend can be self-hosted via Docker-compose, Portainer, Helm, or ArgoCD, utilizing components such as Airflow, Milvus, Redis, and MySQL.

Tokens
13.5K
Snippets
51
Records
69
Agent score
74%

What's inside auto-news

  1. Overview of Auto-News

    main
    Auto-News is an automatic news aggregator powered by Large Language Models (LLMs). It is designed to help users navigate information overload by aggregating various feed sources, generating insights, and filtering noise. It provides a unified reading experience, typically using Notion as a client/frontend.
  2. Key features of Auto-News

    main

    Auto-News provides several automated content processing capabilities:

    • Feed Aggregation: Collects content from RSS, Reddit, Tweets, and more.
    • Insight Generation: Creates summaries and insights for YouTube videos (including transcoding if no transcript is available) and web articles.
    • Noise Reduction: Filters content based on personal interests to remove significant amounts of irrelevant information.
    • Recap & Organization: Provides weekly Top-k recaps, generates TODO lists from takeaways, and organizes daily journal notes with insights.
    • Multi-LLM Support: Compatible with OpenAI ChatGPT, Google Gemini, and Ollama.
    • Experimental Multi-Agents: Supports deep-dive topic research via web search agents and autogen.
  3. Deploy auto-news apps using ArgoCD

    main
    You can deploy the auto-news application services by installing the ArgoCD application manifests. Once the manifests are installed into your ArgoCD instance, ArgoCD will automatically deploy the services. This approach allows you to easily track the status of different services and resources, and simplifies the operation of sub-services within the auto-news ecosystem.
  4. Self-host the Auto-News backend

    main

    For full control, you can self-host the backend. The system uses Notion as the client interface.

    Backend System Requirements

    ComponentMinimumRecommended
    OSLinux, MacOSLinux, MacOS
    CPU2 cores8 cores
    Memory6GB16GB
    Disk20GB100GB

    Installation Methods

    Detailed instructions for each method can be found in the project Wiki:

  5. Use OperatorCollection to manage news aggregation workflows

    main

    The OperatorCollection class is a specialized operator designed to handle the end-to-end lifecycle of news collections. It manages pulling data from various sources (like YouTube, Twitter, or RSS), performing local storage, deduplication, summarization, ranking, and finally publishing the results.

    It relies on several key stages:

    1. Pulling: Fetching items from Notion databases.
    2. Filtering: Pre-filtering by user rating and post-filtering by relevance scores.
    3. Scoring: Using vector similarity (via Milvus) to rank content.
    4. Pushing: Publishing the processed collection back to a target (e.g., Notion).
    from src.ops_collection import OperatorCollection
    
    # Example of the logical flow an end-user would implement
    collection = OperatorCollection()
    # 1. Pull
    raw_pages = collection.pull(collection_type="weekly", sources=["Youtube", "RSS"])
    # 2. Score
    scored_pages = collection.score(raw_pages, top_k_similar=4)
    # 3. Filter
    final_pages = collection.post_filter(scored_pages, k=3, min_score=4.5)
    # 4. Push
    collection.push(final_pages, takeaway_pages=[], targets=["notion"])
  6. Use OperatorRSS for automated RSS news processing

    main

    OperatorRSS is a specialized operator designed to manage the full lifecycle of RSS feed aggregation. It handles pulling data from RSS feeds, deduplicating articles, scoring them based on relevance, summarizing content using LLMs, ranking them by category, and finally pushing them to targets like Notion.

    Key capabilities include:

    • Pulling: Fetches articles from RSS URLs stored in Notion databases.
    • Deduplication: Prevents processing the same article multiple times using MD5 hashing of titles and publication dates.
    • Scoring: Uses Milvus vector search to score articles against existing content.
    • Summarization: Uses LLMs to generate summaries, with fallback to web loading if the RSS entry is empty.
    • Ranking: Categorizes and rates articles using LLMs.
    • Pushing: Exports processed articles to Notion 'ToRead' databases.
    # Example of the logical flow an end-user would implement using OperatorRSS methods:
    # 1. Pull articles
    pages = operator_rss.pull()
    # 2. Deduplicate
    deduped_pages = operator_rss.dedup(pages)
    # 3. Score
    scored_pages = operator_rss.score(deduped_pages)
    # 4. Filter
    filtered_pages = operator_rss.filter(scored_pages, k=3, min_score=4)
    # 5. Summarize
    summarized_pages = operator_rss.summarize(filtered_pages)
    # 6. Rank
    ranked_pages = operator_rss.rank(summarized_pages)
    # 7. Push to Notion
    operator_rss.push(ranked_pages, targets=['notion'])
  7. Implement a custom operator by extending OperatorBase

    main

    The OperatorBase class serves as the foundation for defining data processing pipelines in Auto-News. To create a new operator, inherit from OperatorBase and implement the core lifecycle methods. While the base class provides several utility methods for data handling, you are expected to provide implementations for the primary processing steps: pull, dedup, summarize, rank, score, and push.

    class MyCustomOperator(OperatorBase):
        def pull(self):
            # Implement data retrieval logic
            return {}
    
        def dedup(self, data, target):
            # Implement deduplication logic
            return data
    
        def summarize(self, data):
            # Implement summarization logic
            return data
    
        def rank(self, data):
            # Implement ranking logic
            return data
    
        def score(self, data):
            # Implement scoring logic
            return data
    
        def push(self, ranked_data, targets, topk=3):
            # Implement pushing logic
            return
  8. Use OperatorObsidian to manage Obsidian note workflows

    main

    The OperatorObsidian class provides a pipeline for processing news data and converting it into Obsidian markdown files. It follows a three-step pattern:

    1. Deduplication (dedup): Prevents duplicate notes by checking existing IDs in the database.
    2. Filtering (filters): Removes low-quality content based on a rating threshold.
    3. Pushing (push): Generates markdown content from Notion-style data and saves it to a local Obsidian vault.

    To use the push method, you must ensure the OBSIDIAN_FOLDER environment variable is set or provide a data_folder in kwargs.

    from src.ops_obsidian import OperatorObsidian
    
    operator = OperatorObsidian()
    # 1. Deduplicate
    deduped_pages = operator.dedup(pages_dict)
    # 2. Filter
    filtered_pages = operator.filters(deduped_pages, min_rating=4)
    # 3. Push to Obsidian
    operator.push(filtered_pages, data_folder="my_vault/news")