louis backend
Overview
This project contains the Python code and SQL schema for the Louis project
For more information ou Louis, refer to: [https://github.com/ai-cfia/louis](Louis main documentation).
Table of content:
functionality overview
- crawl extract content (main tag) from main website and store in postgres
- separate content into chunks
- get embeddings from chunks
- index documents using embeddings and vectorstore
- search API: converting queries to embedding and searching vectorstore
- agent logic (based on langchain) to take user queries and obtain answers from searcg results, LLM and other search tools
planned functionality
- improve search performance
- index more knowledge based related to the CFIA regulatory work
- build continuous indexing of new pages
- build indexing-on-request API (can accept, queue and process external links)
- switch to tool and have LLM decide which tool to use to answer user query
Layers
Layers:
- louis.db: any interaction with the postgresql database is done here
- louis.blueprints: API are defined here as blueprints for Flask
- louis.agents: agent logic
- louis.crawler:
- .requests: creation of requests here
- .responses: creation of responses here
- .settings: configuration of the crawler. reads from .env
- .chunking.py: chunking logic (splitting docs into logical blocks)
- louis.models: interactions with LLM
- openai.py: openai API interactions
- louis.prompts: natural language configuration of agents
- louis.tools: tools that can be used by the LLM, described with natural language
References