-
Notifications
You must be signed in to change notification settings - Fork 8
Fix RAG zero-recall with HNSW index and add empty-state guidance #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c939e17
Fix RAG zero-recall with HNSW index and add empty-state guidance
CarmenDou 097a7f9
Surface document lookup errors instead of treating them as empty library
CarmenDou a257a04
Keep raw document lookup errors server-side, send generic message to …
CarmenDou afc2e70
Add GEO metadata: OG tags, JSON-LD, canonical, favicon, robots, sitem…
CarmenDou 04a92ff
Swap in final brand logo for favicon and OG image
CarmenDou 367948d
Merge pull request #57 from InsForge/feat/geo-metadata
CarmenDou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import type { MetadataRoute } from 'next'; | ||
|
|
||
| const SITE_URL = process.env.NEXT_PUBLIC_BETTER_AUTH_URL ?? 'http://localhost:3000'; | ||
|
|
||
| export default function robots(): MetadataRoute.Robots { | ||
| return { | ||
| rules: [ | ||
| { | ||
| userAgent: '*', | ||
| allow: '/', | ||
| // API routes carry no indexable content; share links are | ||
| // unlisted-by-design and shouldn't end up in search results. | ||
| disallow: ['/api/', '/share/'], | ||
| }, | ||
| ], | ||
| sitemap: `${SITE_URL}/sitemap.xml`, | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import type { MetadataRoute } from 'next'; | ||
|
|
||
| const SITE_URL = process.env.NEXT_PUBLIC_BETTER_AUTH_URL ?? 'http://localhost:3000'; | ||
|
|
||
| // Everything behind auth is invisible to crawlers anyway; the public | ||
| // surface is the landing redirect and the two auth pages. | ||
| export default function sitemap(): MetadataRoute.Sitemap { | ||
| return [ | ||
| { url: `${SITE_URL}/`, changeFrequency: 'weekly', priority: 1 }, | ||
| { url: `${SITE_URL}/auth/sign-up`, changeFrequency: 'monthly', priority: 0.8 }, | ||
| { url: `${SITE_URL}/auth/sign-in`, changeFrequency: 'monthly', priority: 0.5 }, | ||
| ]; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # AI Notebook | ||
|
|
||
| > AI Notebook is an open-source, self-hosted study workspace for PDFs: upload documents into workspaces and get RAG chat with citations that highlight the exact passage inside the source PDF, auto-generated mindmaps, spaced-repetition flashcards, and NotebookLM-style two-host audio overviews. Built with Next.js, pgvector, and InsForge. | ||
|
|
||
| AI Notebook is an InsForge template: developers fork it as a starting point for their own PDF / study / knowledge-base products. It is the open-source alternative to NotebookLM-style tools, with your data on your own infrastructure and any model via OpenRouter. | ||
|
|
||
| ## Product | ||
|
|
||
| - [Live demo](https://aipdfchat.insforge.site): sign up with any email, upload a PDF, ask a question. | ||
| - [Source code](https://github.com/InsForge/insforge-templates/tree/main/ai-pdf-chatbot): MIT-licensed Next.js app. | ||
| - [Template marketplace](https://insforge.dev/templates): one-command scaffold via `npx @insforge/cli create`. | ||
|
|
||
| ## Key features | ||
|
|
||
| - Workspaces: NotebookLM-style containers grouping PDFs, chats, mindmaps, flashcards, and audio. | ||
| - RAG chat with inline citations: every answer cites sources; clicking a citation opens the PDF at the cited page with the passage highlighted. | ||
| - Mindmaps: workspace-wide concept tree generated from document summaries, rendered with Markmap. | ||
| - Spaced-repetition flashcards: SM-2 lite scheduler with a per-workspace review queue. | ||
| - Audio Overview: two-host podcast summary of a workspace, generated with OpenAI TTS (opt-in). | ||
|
|
||
| ## Stack | ||
|
|
||
| - Next.js App Router, Better Auth, InsForge (Postgres + pgvector + storage + AI gateway), react-pdf, Markmap. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.