You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2268a43
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: product_prd.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Building search engines is usually out of reach for a single engineer, but AI-as
12
12
-**Live behavior**: allow search while indexing is running so new pages appear in results as soon as they are processed.
13
13
-**Visibility**: provide a React dashboard that exposes crawl progress, queue depth, backpressure state, and job list.
14
14
-**Local persistence**: store a lightweight snapshot of pages and jobs on disk so that search can resume after a restart.
15
-
-**Embedding operations**: provide a separate UI mode to start/pause/resume embedding jobs with speed and max-page controls.
15
+
-**Embedding operations**: provide a separate UI mode to control a single embedding engine (start/pause, speed, max-page scope) and reset embeddings when needed.
16
16
-**AI-friendly design**: keep the crawler and indexer logic explicit and understandable, avoiding “black box” scraping libraries.
17
17
18
18
#### Non-goals
@@ -47,11 +47,12 @@ Building search engines is usually out of reach for a single engineer, but AI-as
47
47
- Reads directly from the current in-memory index so queries reflect pages as soon as they are indexed.
48
48
-`GET /search/semantic?query=...` returns semantic matches from persisted page embeddings with similarity scores.
49
49
50
-
-**Embedding job endpoints**
51
-
-`POST /embeddings/jobs/start` starts a manual embedding run with `{ rate_limit_per_sec, max_pages }`.
52
-
-`POST /embeddings/jobs/{job_id}/pause|resume` controls active embedding jobs.
53
-
-`POST /embeddings/jobs/{job_id}/rate-limit` updates embedding speed during runtime.
54
-
-`GET /embeddings/jobs` and `GET /embeddings/jobs/{job_id}` expose embedding progress and status.
50
+
-**Embedding engine endpoints**
51
+
-`GET /embeddings/status` returns embedding progress and current engine state.
To harden this crawler and searcher for a real production environment, the first step would be to separate concerns into independent services: a crawl scheduler, a fleet of crawler workers, an indexing pipeline, a search API, and a UI/API gateway. The current single-process Python implementation can evolve into a **worker template**: wrap the crawler loop into a process that pulls crawl tasks from a durable queue (for example, Kafka, RabbitMQ, or a managed cloud queue), and writes fetched pages to a durable storage and indexing service. Since the project now supports both classical and semantic retrieval, the next production step is a hybrid search layer: keep lexical ranking in a dedicated search engine (such as OpenSearch/Elasticsearch or a managed search service) and move vector storage/retrieval to a scalable vector-capable backend. For persistence, replace the local SQLite database with a replicated database (PostgreSQL or similar) to hold crawl jobs, page metadata, embedding-job state, and operational rate-limit state, and back it with periodic backups and observability.
3
+
To harden this crawler and searcher for a real production environment, the first step would be to separate concerns into independent services: a crawl scheduler, a fleet of crawler workers, an indexing pipeline, a search API, and a UI/API gateway. The current single-process Python implementation can evolve into a **worker template**: wrap the crawler loop into a process that pulls crawl tasks from a durable queue (for example, Kafka, RabbitMQ, or a managed cloud queue), and writes fetched pages to a durable storage and indexing service. Since the project now supports both classical and semantic retrieval, the next production step is a hybrid search layer: keep lexical ranking in a dedicated search engine (such as OpenSearch/Elasticsearch or a managed search service) and move vector storage/retrieval to a scalable vector-capable backend. For persistence, replace the local SQLite database with a replicated database (PostgreSQL or similar) to hold crawl jobs, page metadata, embedding coverage state, and operational rate-limit state, and back it with periodic backups and observability.
4
4
5
5
On the operational side, the system should adopt **strong politeness and safety controls** before crawling the public internet. That includes honoring `robots.txt`, enforcing per-domain and global rate limits, respecting crawl budgets per domain, and providing a “kill switch” for misbehaving jobs. The services should run inside containers orchestrated by Kubernetes or another orchestrator, with metrics and tracing exported to Prometheus/Grafana or an equivalent stack. Authentication and authorization should be added around the APIs, and audit logging enabled for search queries if required. Finally, ranking can evolve from the current dual-mode baseline (classical + semantic) into a calibrated hybrid ranker (lexical + vector re-ranking), while still keeping an interpretable “debug view” so engineers and students can understand why particular URLs are returned for a query.
0 commit comments