npmai #5
sonuramashishnpm
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🚀 npmai
By Sonu Kumar (Viral Boy)
npmaiis a lightweight Python package designed to bridge the gap between users and open-source LLMs.Connect with Ollama and 45+ other powerful models instantly—no installation, no login, and no API keys required, and help in development of RAG Agents without installing anything locally or on cloud and it is free without sigin or signup or any type of limit.
✨ Features
Achievment for npmai:-
We Achieved 1.2 Million+ installations this shows reliabity and trust on npmai
🖥️ Supported Models
llama3.2gemma-2-instruct-9bqwen-2.5-coder-7bmistral-7b-instructphi-3-mediumFalconBaichuan-2InternLMVicunagemma3:12bgemma2:9bqwen3.5:9bWorkflow:-
npmai
Rag
npmai Ecosystem:-
Here
is the main core component of NPMAI ECOSYSTEM in Ecosystem following products are:-
1.NPM-Rag-A.I:-NPM Rag A.I is a beautiful, easy-to-use web application that lets you instantly create and talk to your own private or public knowledge bases using RAG (Retrieval-Augmented Generation).
Visit:-
2.NPM-Journalist:-You can raise voice to Government without getting traced,safe & secure journalism.
Visit:-
3.NPM-AutoCode-A.I:- Full Autonomous agent where A.I will write code to auotmate PC and execute debug and before execution of any code there will be a safety check,full secure.
Visit:-
4.NPM-Youtube-Automation:-Just give us Video and Thumbnail and go to sleep your video will automatically uploaded to Youtube with full meta-data including captions.(Future update:- Your video or any post will be uploaded to all social media platforms from Facebook to X to insta to all).
Visit:-
5.NPM-Debater-A.I:-You can enjoy debate of 4 AI models just enter topic and enjoy infinite debate arena.
Visit:-
6.NPM-Legal-A.I:-Legal Chatbot with specific models,processings for free supports all documents of users (Currently it only support Indian Laws).
Visit:-
7.NPM-Business-Analysis-A.I:-Business Analysis AI where you will explain your business and it will guide you in making plans (Future Updates:- NPM-Youtube-Automation and npmai-RAG will be integrated.)
Visit:-
8.NPM-Data-A.I:-It will analyse your Bank Account transaction history and it will give advice related to your financial future and conditions.
Visit:-
Note:- All projects are free and deployed and production ready.
⚙️ Installation
Install via pip in seconds:
🆕 Latest Update: Version 0.1.9
In this update:-
version 0.1.8 --->> Integrated Supabase for long term storage of vectorised Documents,Added a method in Rag class of npmai sdk "vector_db_use", Updated parameters of Rag class to make compatible with new supabase integrations, Updated Docstrings for Rag class.
version 0.1.7 --->> Updated parameters of Rag class for sending multiple files of all type at once and also added a clear_memory method in Memory class to remove memory files and added docstrings description in every class Ollama,Memory,Rag.
version 0.1.6 --->> Added try and except for api hitting and added huggingface api endpoints as fallback.
version 0.1.5 --->> Just fixed some bugs and added link as a parameter in Rag class.
version 0.1.4 --->> Now you do not need to write code for RAG tools like pdf,image,video,audio,yt-video to text and no need to load whisper and other requirements locally
no local process everything on cloud in free without any signup or singin or key hurdles.
Important Update in NPMAI RAG:-
🚀 NPMAI Update: Advanced RAG & Refine Architecture
We have officially upgraded the NPMAI Ecosystem to a more intelligent, cost-efficient, and "Product-Ready" pipeline. These updates move beyond basic RAG into High-Performance Agentic Retrieval.
🔍 1. Dynamic K-Context Retrieval (70% Coverage)
The Problem:
Standard RAG systems use a fixed
kvalue (e.g.,k=4). This is inefficient—it provides too little context for large documents (missing facts) and too much "noise" for tiny documents (wasting tokens).The Solution:
I have engineered a Proportional Scaling Logic that calculates the optimal number of chunks to retrieve based on the actual density of your vectorized database.
dynamic_k = max(1, int(total_chunks * 0.70))🔄 2. Sliding Window Batch-Refinement (3-Chunk Window)
The Problem:$N$ separate API calls. For a 30-chunk document, the user waits too long.
Traditional "Refine" strategies process one chunk at a time. This is incredibly slow because it makes
The Solution:
I have implemented a Sliding Window Batch-Refine system that processes chunks in groups of 3 instead of 1.
for i in range(0, total_chunks, 3):☁️ 3. Infrastructure: Persistent Supabase Integration (v0.1.8)
We have successfully integrated Supabase Object Storage to move from temporary memory to Persistent Knowledge Bases.
.faissand.pklindex files are now automatically uploaded to a secure Supabase bucket.Summary:
These architectural changes make NPMAI one of the most efficient open-source RAG frameworks available for developers who need Speed + Accuracy without the high cost of standard 1-by-1 refinement.
Please star our project on Github please.
🔗 Resources
Documentation: npmai.netlify.com
API Endpoint: https://npmaiecosystem-loadbalancer.hf.space/load_balancer
Fallback API Endpoint: https://npmaiecosystem-loadbalancerfallback.hf.space/load_balancer
Developed with ❤️ to make AI accessible to everyone.
Developer and Maintainer:- Sonu Kumar
Thankyou Statement:-
So thankyou for Installations and Support of you people
npmaiPYPI Package achieved 1.2 Million+ Installations today and npmai is getting installed daily by 15k Installations.This discussion was created from the release npmai.
Beta Was this translation helpful? Give feedback.
All reactions