frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

An Enterprise-Level Retrieval-Augmented Generation System

https://comfyai.app/article/llm-applications/enterprise-level-rag-hands-on-practice-II
6•zljdanceholic•1y ago

Comments

zljdanceholic•1y ago
How can we search the wanted key information from 10,000+ pages of PDFs within 2.5 hours? For fact check, how do we implement it so that answers are backed by page-level references, minimizing hallucinations?

RAG-Challenge-2 is a great open-source project by Ilya Rice that ranked 1st at the Enterprise RAG Challenge, which has 4500+ lines of code for implementing a high-performing RAG system. It might seem overwhelming to newcomers who are just beginning to learn this technology. Therefore, to help you get started quickly—and to motivate myself to learn its ins and outs—I’ve created a complete tutorial on this.

We have a complete graph to explain its workflow where multiple tools are used: Docling for parsing PDFs, LangChain for chunking text, faiss for vectorization and similarity searching, and chatgpt for LLMs.

Besides, I also outline the codeflow, demonstrating the running logic involving multiple python files where starters can easily get lost. Different files are colored differently. The purpose of showing this is not letting you memorize all of these file relationships. It works better for you to check the source code yourself and use this as a reference if you find yourself lost in the code.

The original project of Ilya Rice design its RAG system for answering questions of annual reports from companies, so he only designed three types of question response format for that challenge: a name, a number, or a boolean. But to ask questions about technical stuff, we absolutely ask general questions like How does RoPE work? to know about some concepts and the like Therefore, I further modify the system logic to fit this need by customizing an AnswerWithRAGContextExplanationPrompt class and automatically matching the most related chapter and corresponding pages via searching through all faiss databases (only retrieve the top-1) The final performance is demonstrated below (not cherry-picked, only tested once).

- What's the steps to train a nanoGPT from scratch? The answer is:

Training nanoGPT from scratch involves several clearly defined steps. First, set up the environment by installing necessary libraries, using either Anaconda or Google Colab, and then download the dataset (e.g., tinyShakespeare). Next, tokenize the text into numerical representations and split the data into training and validation sets. Define the model architecture including token/positional embeddings, transformer blocks with multi-head self-attention and feed-forward networks, and layer normalization. Configure training hyperparameters and set up an optimizer (such as AdamW). Proceed with a training loop that performs forward passes, computes loss, backpropagates, and updates parameters, while periodically evaluating performance on both training and validation data. Finally, use the trained model to generate new text from a given context.

All code are provided on Colab and the tutorial is referenced here. Hope this helps!

Musings on Tracing in PyPy (2025)

https://pypy.org/posts/2025/01/musings-tracing.html
1•tosh•1m ago•0 comments

Thoughts on the Commodore 8020 smart flip phone?

https://www.wired.com/story/commodore-callback-8020-is-a-digital-detox-phone-that-isnt-dumb/
1•gorfian_robot•1m ago•2 comments

Explaining Functional Programming to Non-Programmers (It's Just Excel)

https://cekrem.github.io/posts/explaining-functional-programming-to-non-programmers/
1•ckardaris•3m ago•0 comments

Musk to sue German broadcaster ZDF over 'hunt for migrants'

https://www.dw.com/en/elon-musk-sues-zdf-hunt-for-migrants-belfast/a-77571443
1•vrganj•4m ago•1 comments

Show HN: VibeSH – Hallucinated Terminal Shell

https://codeberg.org/beleon/vibeSH
3•rowbin•4m ago•0 comments

Building the Live Context Graph for Agents, 28 Weekly Releases Later

https://materialize.com/blog/building-the-live-context-graph-for-agents/
1•pranshum•5m ago•0 comments

SpaceX has acquired Cursor

https://twitter.com/spacex/status/2066873915717136548
2•napolux•5m ago•2 comments

Ask HN: Why aren't hardware passkeys used for access token creation?

1•zackify•5m ago•0 comments

10 Years In, and Claude Just Made Me a Better Engineer

https://medium.com/beyond-bits/10-years-in-and-claude-just-made-me-a-better-engineer-58b5d3c630f6
1•laxmansharma•7m ago•0 comments

Show HN: git-lrc – Free, Micro AI Code Reviews That Run on Git Commit

https://github.com/HexmosTech/git-lrc
2•atomicnature•8m ago•0 comments

The Doctor Who Treats Patients with a Gaming Mouse

https://textexpander.com/blog/doctor-gaming-mouse
1•jcenters•8m ago•0 comments

I gave ChatGPT a body [video]

https://www.youtube.com/watch?v=S67z2aekBrI
1•Malfunction92•8m ago•0 comments

Vibe coding can build your pipeline. It can't explain it six months later

https://venturebeat.com/orchestration/vibe-coding-can-build-your-pipeline-it-cant-explain-it-six-...
1•speckx•9m ago•0 comments

Net CO2 release from permafrost soil carbon thaw predicted earlier this century

https://www.science.org/doi/10.1126/sciadv.adz8478
1•littlexsparkee•9m ago•0 comments

What Is Minimalism Worth?

https://carlbarenbrug.com/minimalism-worth
1•surprisetalk•11m ago•0 comments

The Verifier Tax: Safety–Success Tradeoffs in Tool-Using LLM Agents

https://dl.acm.org/doi/10.1145/3786335.3813160
1•tanmaysah•13m ago•0 comments

Show HN: AgentPace – Forecast when your coding agent usage will run out

https://festudio.net/agentpace/
2•jrflo•13m ago•0 comments

Social media is awful but the UK under-16 ban won't solve anything

https://www.pcgamer.com/software/platforms/social-media-is-awful-but-the-uk-under-16-ban-wont-sol...
1•evo_9•14m ago•0 comments

Facing reality, Apple or EU, is a core requirement for good management (2024)

https://www.baldurbjarnason.com/2024/facing-reality-in-the-eu-and-tech/
1•davidgerard•14m ago•0 comments

Show HN: WhatsApp Clone, but Decentralized with P2P Messaging

https://enkrypted.chat
2•Screen8774•15m ago•0 comments

Show HN: The Dictionary Game (Fictionary/Balderdash) as a Daily Puzzle

https://dictionarypuzzle.com/
2•woutervd•15m ago•0 comments

A Tale of Two Browsers

https://adactio.com/journal/22609
2•robin_reala•16m ago•0 comments

PR Preview – Generate before/after videos for front end pull requests

https://www.pr-preview.com
1•VladNiculescu•16m ago•0 comments

Bandcamp explorer: RSS feed for every Bandcamp genre/tag and every artist

https://bandcamp.k47.cz/
1•ggrelet•16m ago•0 comments

Onhand: An AI tutor that lives on the page you're reading

https://useonhand.com/
1•phineas1500•16m ago•1 comments

Statistics of a Distribution on Unitary Matrices

https://mathoverflow.net/questions/512341/statistics-of-a-distribution-on-unitary-matrices
1•jjgreen•17m ago•0 comments

Cursor to Join SpaceX

https://xcancel.com/cursor_ai/status/2066875698346954891
2•SpyCoder77•17m ago•1 comments

Show HN: MockNest Serverless – Bedrock-Assisted API Mocks on AWS Lambda

https://github.com/elenavanengelenmaslova/mocknest-serverless
1•elenavanengelen•17m ago•1 comments

French domestic spy agency ditches Palantir for local rival, PM says

https://www.rappler.com/technology/french-dgsi-spy-agency-ditches-palantir-rival-chapsvision/
2•vidalee•18m ago•0 comments

SpaceX to Acquire Cursor

https://xcancel.com/SpaceX/status/2066873915717136548
1•SpyCoder77•18m ago•1 comments