https://github.com/punnerud/Local_Knowledge_Graph Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus 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 }} punnerud / Local_Knowledge_Graph Public * Notifications You must be signed in to change notification settings * Fork 5 * Star 114 114 stars 5 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights punnerud/Local_Knowledge_Graph This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 4 Commits templates templates .DS_Store .DS_Store README.md README.md app.py app.py example.png example.png requirements.txt requirements.txt View all files Repository files navigation * README Local Knowledge Graph Example This application uses a local Llama model to answer queries, build embeddings, and create a knowledge graph for exploring related questions and answers. Description The Local Knowledge Graph is a Flask-based web application that leverages a local Llama language model to process user queries, generate step-by-step reasoning, and visualize the thought process as an interactive knowledge graph. It also finds and displays related questions and answers based on semantic similarity. Features * Interactive web interface for submitting queries * Step-by-step reasoning process displayed in real-time * Dynamic knowledge graph visualization of the reasoning steps * Calculation and display of the strongest reasoning path * Related questions and answers based on semantic similarity * Local processing using a Llama language model Usage 1. Ensure you have all the required dependencies installed. 2. Start the Flask application by running app.py. 3. Open a web browser and navigate to http://localhost:5100 (or the appropriate port if modified). 4. Enter your query in the input field and click "Submit". 5. Watch as the application generates a step-by-step reasoning process, updating the knowledge graph in real-time. 6. Review the final answer and the strongest reasoning path. 7. Explore related questions and answers displayed below the main response. Requirements * Python 3.7+ * Flask * NumPy * scikit-learn * Annoy * NetworkX * A local Llama language model (e.g., llama3.1:8b) running on http: //localhost:11434 Installation 1. Clone this repository. 2. Install the required Python packages using the requirements.txt file: pip install -r requirements.txt 3. Ensure you have a local Llama model running and accessible. 4. Run the Flask application: python app.py Note This application requires a local Llama language model to be running and accessible. Make sure you have the appropriate model set up and running before using this application. About No description, website, or topics provided. Resources Readme Activity Stars 114 stars Watchers 2 watching Forks 5 forks Report repository Releases No releases published Packages 0 No packages published Languages * Python 69.2% * HTML 30.8% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.