Building a Personal Information Feed with AI: Compliant Collection and Transparent Ranking
This guide shows how to build a personal information feed with an AI coding assistant. It covers a five-layer architecture, a database design for information sources, a compliant collection workflow, and an explainable weighted ranking model with a Python example. Collection and ranking rules stay under your control.
1. The Short Answer
An AI coding assistant can speed up building a personal information feed. Two things determine whether the project succeeds: whether collection is compliant, and whether the ranking rules are transparent. This article covers them in that order.
2. Why Build Your Own Entry Point, and Its Limits
Recommendation algorithms on mainstream content platforms usually aim to increase time spent on the platform. This creates three common problems. High-stimulation content pushes in-depth content out of view. Updates from creators you follow get buried by the ranking. The layout, playback logic, and information density are all defined by the platform.
A self-built entry point replaces “the algorithm decides what you see” with “you set the rules, and a program enforces them.” You can aggregate only sources you have curated by hand, rank them by your own weights, and decide how densely each item is displayed.
This does not mean you can fully escape filter bubbles. Source quality, content copyright, and collection compliance all affect the results. If you subscribe to only five blogs on the same topic, your feed will still be narrow. The benefit of a self-built entry point is control and explainability, not complete coverage of information.
3. Architecture: What Each of the Five Layers Does
- Collection layer: Pulls metadata from subscribed feeds or open APIs, including title, author, publication time, summary, and original link.
- Storage layer: Stores content metadata, source configurations, and reading status. For a personal project, SQLite or PostgreSQL is enough.
- Filtering and ranking layer: Scores items by keyword, source weight, and freshness, and filters out content you do not want to see.
- API layer: Provides REST-style endpoints for lists, item details, and preference settings.
- Presentation layer: A web or mobile interface that renders the layout you define.
The system stores only metadata and original links. It does not store full article text or images. This reduces copyright risk and storage costs.
The source configuration needs clearly defined field types. The table below shows the design of the sources table.
| Field | Type | Description |
|---|---|---|
| source_id | string, primary key | Unique identifier of the source |
| name | string | Display name |
| source_type | enum | One of rss, atom, official_api, or manual |
| feed_url | string | Feed or API address, required |
| weight | float, 0 to 1 | Source weight used in ranking |
| enabled | bool | Whether the source is collected, default true |
| fetch_interval_minutes | int, at least 30 | Collection interval, to avoid frequent requests |
| terms_checked_on | date | Date when the terms of service were last manually reviewed |
| license_note | string | Notes on reprint and copyright |
An example record:
{"source_id": "tech_blog_a","name": "A technical blog","source_type": "rss","feed_url": "https://example.com/feed.xml","weight": 0.9,"enabled": true,"fetch_interval_minutes": 60,"terms_checked_on": "2026-11-01","license_note": "Only the title, summary, and original link are stored"}
The items table uses (source_id, external_id) as its deduplication key. external_id prefers the guid from the feed. If the guid is missing, it falls back to the normalized original URL. Publication times are stored in UTC. Deletion uses soft delete: the system writes a deleted_at value, and rows are purged physically on a regular schedule.
When collection fails, retry with exponential backoff, up to three times. On a 429 status code, read the Retry-After response header and wait for the specified time. Sources that keep failing are marked as abnormal, and you are notified. The system does not switch to other methods to get around the restriction.
4. Using AI for Development: Four Steps
Some developers have publicly shared cases of building video app prototypes in a short time with AI coding assistants. The durations and feature scopes vary by case, so this article does not treat any duration as a productivity guarantee. The following four steps are a safer approach.
Step 1: Define the project with a structured prompt. Describe the tech stack, pages, data tables, and API list. For example: “Use a frontend component framework and a lightweight backend framework to implement three modules: source management, feed list, and keyword filtering. The database contains three tables: sources, items, and preferences.”
Step 2: Generate and verify module by module. Ask the AI to produce the data models and API definitions first. After you confirm them, generate one module at a time, and run each one locally before moving on.
Step 3: Iterate with tests. Ask the AI to generate unit tests and API tests together with the code. When something fails, send the error message and the expected behavior back to the AI. Do not just reword the request and start over.
Step 4: Review security-related code yourself. Authentication, input validation, and sensitive data handling must be reviewed by the developer. Do not accept the default implementations the AI generates.
When a tool refuses a certain request, stop and check the requirement itself. If the requirement involves bypassing access controls, cracking API signatures, or scraping content that is explicitly prohibited, the right move is to drop that approach. Rewording the prompt until the tool complies only shifts the risk onto you.
5. Data Collection: Compliant Paths Only
Collection needs the most caution. Three sources are recommended:
- Standard feed protocols: RSS and Atom are the most common sources for personal aggregators. Sites publish updates on purpose, and the structure is stable.
- Platform open APIs: Some platforms offer public APIs to developers. Follow their usage terms and quotas.
- Manually curated imports: For high-quality sources, maintain a list by hand. You decide which addresses to include, import them on a schedule, and record the date of each review.
Avoid these practices: bulk scraping that bypasses logins or access controls, cracking API signatures, scraping content the platform explicitly prohibits, and storing full text or images to display them publicly.
Before adding each source, confirm the following:
- The terms of service allow automated access or subscription
- The site’s robots.txt does not prohibit the feed address
- The data use stays within the permitted scope and is for personal use only
- The request rate does not exceed what the site specifies, and a local minimum collection interval is set
- Only the title, summary, author, time, and original link are stored
- Only the necessary user data is collected
- The source can be disabled with one action, and all cached data from that source can be deleted
6. Filtering and Ranking: Making the Rules Explainable
A weighted multi-factor score is an easy-to-understand starting point that is simple to debug. Each factor’s contribution is visible, so you can explain why an item ranks high and why another item was filtered out.
import mathfrom dataclasses import dataclassfrom datetime import datetime@dataclassclass Item:title: strsource: strpublished_at: datetime # Must include timezonequality_signal: float # 0 to 1, a verifiable metric you define@dataclassclass Prefs:source_weights: dict[str, float]boost_keywords: list[str]block_keywords: list[str]freshness_decay_hours: float = 72.0def contains_blocked(item: Item, prefs: Prefs) -> bool:title = item.title.lower()return any(k.lower() in title for k in prefs.block_keywords)def keyword_match(title: str, keywords: list[str]) -> float:"""Maps the number of matched keywords to a 0 to 1 range. Three or more matches earn the full score."""title = title.lower()hits = sum(1 for k in keywords if k.lower() in title)return min(hits, 3) / 3def freshness(published_at: datetime, now: datetime, decay_hours: float) -> float:hours = max((now - published_at).total_seconds() / 3600, 0.0)return math.exp(-hours / decay_hours)def score_item(item: Item, prefs: Prefs, now: datetime) -> float:if contains_blocked(item, prefs):return -1.0source_w = prefs.source_weights.get(item.source, 0.0)score = (0.4 * source_w+ 0.3 * keyword_match(item.title, prefs.boost_keywords)+ 0.2 * freshness(item.published_at, now, prefs.freshness_decay_hours)+ 0.1 * item.quality_signal)return round(score, 3)def build_feed(items, prefs, now, min_score=0.6):scored = [(score_item(i, prefs, now), i) for i in items]kept = [(s, i) for s, i in scored if s >= min_score]kept.sort(key=lambda p: p[0], reverse=True)return keptif __name__ == "__main__":from datetime import timezoneprefs = Prefs(source_weights={"tech_blog_a": 0.9, "video_creator_b": 0.8},boost_keywords=["architecture design", "engineering practice", "source code analysis"],block_keywords=["clickbait"],)now = datetime(2026, 11, 24, 15, 0, tzinfo=timezone.utc)items = [Item("Architecture design and engineering practice review", "tech_blog_a",datetime(2026, 11, 24, 12, 0, tzinfo=timezone.utc), 0.8),Item("Clickbait: solving every problem overnight", "video_creator_b",datetime(2026, 11, 24, 14, 0, tzinfo=timezone.utc), 0.9),Item("Source code analysis: the scheduler of an open-source library", "video_creator_b",datetime(2026, 11, 20, 0, 0, tzinfo=timezone.utc), 0.5),]for score, item in build_feed(items, prefs, now, min_score=0.5):print(score, item.title)
The code uses only the standard library of Python 3.9 or later, so it needs no extra installation. The output is:
0.832 Architecture design and engineering practice review0.513 Source code analysis: the scheduler of an open-source library
The first item matches two keywords, was published three hours earlier, and comes from a high-weight source, so it scores highest. The second item was published four days earlier. Its freshness score is only 0.214, but it matches a keyword and comes from a source with a high weight, so its combined score still reaches 0.513. The third item contains a blocked word, so it receives -1 and is filtered out. The example uses a threshold of 0.5 only for demonstration. In practice, you set the threshold in your preferences.
You define the quality signal yourself. Examples include manual ratings or verifiable data that the source publishes. Do not use numbers whose origin you cannot verify.
7. Presentation Layer: Build the Minimum Viable Version First
The features below are listed by priority. Each has an acceptance criterion.
- Channel grouping: Group items by topic or source instead of showing a single timeline. Acceptance criterion: Each channel shows only its own content, and the scroll position is restored when you switch channels.
- Read status and read-later list: Acceptance criterion: Read status persists after a page refresh, and you can add and remove items from the read-later list.
- Daily digest: A scheduled job summarizes the items added that day and generates a list of titles. Acceptance criterion: The digest is generated once at a fixed time each day, and no empty digest is sent when there is no new content.
- Layout switching: Provide three modes: titles, summaries, and cards. Acceptance criterion: Switching layouts does not re-request data.
- Full-text search: Start with the database’s built-in full-text index. Acceptance criterion: Search covers titles and summaries, and common queries return results within one second.
These features support reading efficiency, not time spent on the platform, so mainstream platforms often do not offer them. In a self-built entry point, you decide how each one works.
8. Conclusion
AI lowers the barrier to building this kind of system, but it does not decide what you should read. The real work is planning your sources, staying within compliance boundaries, and writing down clear ranking rules. Starting with one compliant source and one explainable rule, then adding features step by step, is more reliable than building a complete system all at once.
