frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Hybrid Knowledge Graph and RAG for Legal Documents (Learning Project)

https://github.com/srijanshukla18/ita-kg
5•srijanshukla18•4h ago
Built this as a toy project to understand knowledge graphs by tackling a real problem: traditional RAG fails badly on legal documents because it misses interconnections between sections.

The system actually combines both approaches on every query - gets semantic matches via TF-IDF, retrieves structural relationships from Neo4j, then feeds both contexts to OpenAI for comprehensive answers.

Used the Indian Income Tax Act as test data since legal documents have natural graph structures. Queries like "What sections reference Section 80C?" get both the reference network AND content explanations.

Full transparency: includes some AI-assisted code as I was learning Neo4j/graph concepts, but the hybrid architecture and problem framing are mine.

Tech stack: Python, Neo4j, OpenAI API, scikit-learn (TF-IDF), numpy. Docker + Makefile for easy setup.

Would love feedback on this pattern for other structured documents.

Comments

tushr•3h ago
This is an interesting projects. Did you get to explore how you can do the same with the dynamic documents? For instance, a google doc or MS Word file which keeps on changing with every change the graph must update.
srijanshukla18•2h ago
oh great question, hadn't thought of that. But this particular project the TF-IDF vectors and KG building is all local, and the main.py builds both during every start can be adding a hook to listen for file changes and rebuild KG and vectors I guess

Trump signs new stablecoin regulations into law

https://apnews.com/article/donald-trump-stablecoins-congress-cryptocurrency-94fa3c85e32ec6fd5a55576cf46e58ea
1•Brysonbw•1m ago•0 comments

When is it the best time to post on SHOW HN?

https://www.myriade.ai/blogs/when-is-it-the-best-time-to-post-on-show-hn
1•BenderV•3m ago•0 comments

Show HN: Myriade – Ask your database questions in plain English

https://github.com/myriade-ai/myriade
1•BenderV•6m ago•0 comments

Women CAs in India – Top

https://www.womenentrepreneursreview.com/leader/tanuja-sinha-empowering-nris-highnet-worth-individuals-with-expert-tax-solutions-vid-4972.html
1•davanumsrinivas•6m ago•0 comments

Solving a Childhood Mystery: How BASIC Games Learned to Win

https://sublevelgames.github.io/blogs/2025-07-20-basic-game-hexapawn/
1•greentec•7m ago•1 comments

Borrow an Identity

https://mrmichael.co/borrow-an-identity
1•freediver•14m ago•0 comments

China's BYD Takes the Lead over Tesla in the Self-Driving Car Wars

https://gizmodo.com/chinas-byd-takes-the-lead-over-tesla-in-the-self-driving-car-wars-2000631712
1•bookofjoe•17m ago•0 comments

In Search of Dignity: Kurt Vonnegut Predicts AI (In "Player Piano")

https://thefordhamram.com/culture/in-search-of-dignity-kurt-vonnegut-predicts-ai/
1•LeftHandPath•17m ago•1 comments

Underused Techniques for Effective Emails

https://refactoringenglish.com/chapters/techniques-for-writing-emails/
2•mtlynch•18m ago•1 comments

Group Behind Steam Censorship Policies Have Powerful Allies

https://web.archive.org/web/20250719204151/https://www.vice.com/en/article/group-behind-steam-censorship-policies-have-powerful-allies-and-targeted-popular-games-with-outlandish-claims/
24•davikr•25m ago•1 comments

AICodingHorrors – The price of AI-assisted coding

https://aicodinghorrors.com/
4•cratermoon•27m ago•0 comments

Stop pretending you know what AI does to the economy

https://www.noahpinion.blog/p/stop-pretending-you-know-what-ai
2•cwwc•27m ago•1 comments

Books of the Year (So Far)

https://www.nytimes.com/2025/05/07/books/best-books-2025-so-far.html
1•Brajeshwar•28m ago•0 comments

Earth's magnetic field is weakening

https://www.livescience.com/archaeology/earths-magnetic-field-is-weakening-magnetic-crystals-from-lost-civilizations-could-hold-the-key-to-understanding-why
2•Brajeshwar•28m ago•0 comments

Dystopia or utopia? The futuristic visions driven by billionaires

https://www.abc.net.au/news/2025-07-20/futuristic-cities-and-what-we-know-about-them/105049948
3•Brajeshwar•28m ago•0 comments

Perplexity's Comet is the AI browser Google wants

https://www.theverge.com/news/709025/perplexity-comet-ai-browser-chrome-competitor
2•freedomben•33m ago•0 comments

L.A. Wildfire victims struggle to rebuild with natural materials

https://www.latimes.com/environment/story/2025-06-28/natural-building-materials-wildfires-altadena
2•PaulHoule•34m ago•0 comments

Rust Clippy performance status update

https://blog.goose.love
1•todsacerdoti•34m ago•0 comments

US signals intention to rethink job H-1B lottery

https://www.theregister.com/2025/07/20/h_1b_job_lottery/
16•rntn•35m ago•1 comments

Responsible AI in Enterprise Applications: A Practitioner's View

https://www.jjude.com/responsible-ai-in-enterprise-apps/
1•todsacerdoti•35m ago•0 comments

Mitochondrial Origins of the Pressure to Sleep

https://www.nature.com/articles/s41586-025-09261-y
2•walterbell•37m ago•0 comments

How I Use Claude Code to Ship Like a Team of Five

https://every.to/source-code/how-i-use-claude-code-to-ship-like-a-team-of-five
1•ghuntley•45m ago•0 comments

I'm Unsatisfied with Easing Functions

https://www.davepagurek.com/blog/easing-functions/
2•surprisetalk•46m ago•0 comments

Euler's Identity

https://pgadey.ca/notes/eulers-identity/
1•surprisetalk•46m ago•0 comments

Differential Form of Gauss's Law

https://thinking-about-science.com/2025/07/15/25-12-differential-form-of-gausss-law/
1•surprisetalk•47m ago•0 comments

Bus Bunching

https://www.futilitycloset.com/2025/07/12/bus-bunching/
2•surprisetalk•47m ago•0 comments

How the Free Software Foundation battles the LLM bots

https://thenewstack.io/how-the-free-software-foundation-battles-the-llm-bots/
4•MilnerRoute•47m ago•0 comments

Agent-dir: push A2A agent cards to Git, get a lightweight agent catalog

https://github.com/aymenfurter/agent-dir
1•jacksensi•48m ago•0 comments

I found a tool for comparing two lists, which has complete functions

https://list-difference.com
1•ri-vai•49m ago•0 comments

Show HN: Generate bitmap fonts from custom images

https://calligro.ideasalmanac.com/
1•Voycawojka•49m ago•0 comments