跳到正文
DEV Community· Shruti Hiraman Kotgire·· 5 小時前AI 評分47

Afterlink:為互聯網消失的文件建立 AI 調查工具

The 404 Wasn't the End. I Built an AI Investigator for the Internet's Ghosts.

AI 導讀

Afterlink 是一款 AI 文件調查工具,可搜尋失效或變更的文件連結的歷史版本、擷取 Internet Archive 的封存內容,並根據證據提供調查建議。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine.

A documentation link breaks.

You try it again. Still broken.

Maybe the page moved. Maybe the project was abandoned. Maybe someone deleted years of useful explanations without leaving a forwarding address.

But what if the page isn't completely gone?

What if a copy is still hiding somewhere in the history of the internet?

That's the question behind Afterlink.

What I Built

Afterlink is an AI-powered documentation investigation tool. It searches for historical versions of broken or changed documentation links, retrieves archived content, and uses AI to help investigate what those pages contained.

I interpreted Ghost in the Machine as the forgotten parts of the internet: documentation that disappears, tutorials that become inaccessible, and technical knowledge that survives only in old snapshots.

I wanted to build something that could investigate those digital traces rather than simply announce that a link was broken.

Here's the investigation process:

  1. Upload a Markdown or text document.
  2. Afterlink extracts the documentation links.
  3. It checks which links are accessible, redirected, or unavailable.
  4. It searches the Internet Archive for historical captures.
  5. It retrieves archived pages and extracts readable content.
  6. AI examines the supplied historical evidence and generates investigation recommendations.
  7. It shows the evidence behind its recommendation.
  8. The application compares original and archived content and lets you save or export the investigation.
  9. It lets you save the investigation and export the results.

The important part is what Afterlink doesn't do.

It doesn't silently replace your broken link.

It doesn't pretend that an AI-generated answer is historical truth.

It doesn't commit changes to your repository.

Instead, it gives you evidence and lets you decide what should be recovered.

Afterlink doesn't resurrect documentation by guessing. It investigates what the archive remembers.

That is my interpretation of the Ghost in the Machine theme: the "ghost" is forgotten documentation still haunting the links inside today's codebase.

The key design decision: AI must investigate evidence, not invent history.

A model can produce a convincing explanation of a missing page without actually knowing what it contained. Afterlink validates recommendation URLs and evidence excerpts against the supplied archive information before displaying them.

It also preserves the distinction between an unavailable page, an archived page, and a conclusion supported by historical evidence.

Demo

Try Afterlink: https://afterlink-sigma.vercel.app/

Source code: https://github.com/shrutikotgire0129/afterlink

The application is deployed on Vercel. You can load the sample project and run an investigation without installing Ollama.

Screenshots

The investigation workspace

Afterlink main interface

Investigation results

Afterlink investigation results

Original versus archived content

Afterlink content comparison

Investigation history

Afterlink investigation history

Code

Repository: https://github.com/shrutikotgire0129/afterlink

Tech stack:

  • Next.js 16
  • React
  • TypeScript
  • Tailwind CSS
  • Ollama
  • Gemma 3 1B
  • Groq API
  • GPT-OSS 20B
  • Internet Archive

The main investigation pipeline:

Document
   |
   v
Link Extraction
   |
   v
Link Availability Checks
   |
   v
Internet Archive CDX Search
   |
   v
Archived Page Retrieval
   |
   v
Content Extraction
   |
   v
AI Investigation
   |
   v
Evidence Validation
   |
   v
Original / Archive Comparison
   |
   v
Investigation Report

Each stage has its own API route. That separation makes it easier to validate inputs, handle failures, and prevent an error in one stage from silently becoming an incorrect investigation result.

How I Built It

1. The open-weight model is part of the actual workflow

I wanted Afterlink to support local AI inference rather than depend entirely on a hosted model.

For local development, I integrated:

  • Ollama as the local inference runtime.
  • Gemma 3 1B as the local model.

The application communicates with Ollama through its local API:

http://localhost:11434/api/chat

This made it possible to develop and run the AI investigation workflow on my own machine without requiring a paid hosted AI API for local inference.

2. A different inference provider for the public demo

I also wanted anyone to be able to try Afterlink without installing a model locally.

The deployed Vercel application therefore uses Groq with the open-weight openai/gpt-oss-20b model.

Environment AI runtime Model
Local development Ollama Gemma 3 1B
Production deployment Groq GPT-OSS 20B

The provider is selected server-side based on the execution environment. The Groq API key is stored as a server-side environment variable.

I tested an important deployment scenario: I stopped Ollama on my computer and ran the complete AI investigation workflow on the deployed Vercel application. It continued working.

The production application does not depend on my computer being switched on.

3. The difficult part: preventing convincing but unsupported answers

An AI model can return a plausible archive recommendation that doesn't actually match the historical capture supplied to it.

During development, I encountered an issue where matching candidates using only the original page URL was insufficient when multiple archive snapshots existed.

I tightened the matching logic so that both the original candidate URL and the exact archive URL must match.

I also added validation for evidence excerpts. An excerpt must be present in the supplied archived content; the model cannot simply invent a quotation and present it as evidence.

Other reliability measures include:

  • Request and URL validation.
  • Response-size limits.
  • Timeouts for external requests and model inference.
  • Validation of incomplete or malformed AI responses.
  • Error handling when Ollama or the hosted AI provider is unavailable.
  • Clear distinction between unavailable archive content and evidence that a page never existed.

I deliberately prefer an uncertain result over an unsupported conclusion.

4. The investigation doesn't end with the AI response

Afterlink also supports:

  • Original-versus-archive content comparison.
  • Markdown investigation reports.
  • JSON export.
  • Investigation history with restore and delete functionality.

The result is intended to be useful beyond a single AI response.

Why Does Open Innovation Matter?

The open part of Afterlink changes how the investigation system can be run and adapted.

Local inference: Gemma 3 1B can run through Ollama on a developer's own machine. Local analysis doesn't require sending the AI prompt to a hosted model provider.

Model flexibility: The investigation workflow is separated from the model provider. I can use Gemma locally and a different open-weight model in production without redesigning the entire application.

Control and experimentation: Running an open-weight model locally makes it possible to inspect its behavior, change prompts, test limitations, and improve evidence validation around its actual outputs.

Accessibility: A small model makes local experimentation possible on modest hardware, although inference speed and available memory still depend on the machine.

There is an important limitation: retrieving historical pages still requires internet access, and the public Vercel demo uses hosted inference. Afterlink is not an entirely offline archive crawler.

For me, open innovation made the project more flexible: I could develop locally, experiment with an open-weight model, and make the application accessible through a hosted deployment.

The Spirit of It

A 404 page is a strange kind of disappearance.

The address is still there. The link is still in someone's notes, tutorial, or README. But the information behind it has vanished.

Sometimes an old snapshot survives.

Maybe it contains the explanation someone needs. Maybe it only contains part of the page. Maybe it provides no useful evidence at all.

Afterlink cannot bring every missing page back. It can, however, investigate what remains and make that evidence easier to understand.

I built it around one idea:

The internet forgets. The archive remembers. Afterlink investigates.

What I Learned

The biggest lesson from building Afterlink was that AI is often most useful when it is not allowed to do everything.

The strongest parts of the application are the boundaries around the model:

  • deterministic link extraction
  • explicit archive retrieval
  • bounded content extraction
  • evidence validation
  • original-versus-archive comparison
  • human review
  • visible uncertainty

The model handles the ambiguous part.

Code handles the parts that should be predictable.

That separation made the project much more reliable.

Prize Categories

  • Best Use of Gemma: The local inference workflow uses Google's Gemma 3 1B model through Ollama. The deployed application uses GPT-OSS 20B through Groq, which is a separate production inference path.

Final Thought

Documentation disappears quietly.

Usually there is no warning.

No final message.

No tombstone.

Just a link that suddenly returns 404.

But the code that depended on that documentation can survive for years.

So I built Afterlink around one question:

When the documentation is gone, what evidence is still alive?

The docs disappeared.
The code remembered.
Afterlink goes looking for what remains.

Built for Ghost in the Machine

Thank you for taking a look at Afterlink — and happy Hacktoberfest. 👻

來源:DEV Community · dev.to