Towards Enhancing Enterprise Knowledge Extraction from Confluence by using Retrieval-Augmented Generation
- Add your Confluence credentials to
.env. - Set optionally the embedding model and the LLM you want to use for RAG in
.env - If you want to employ other embedding models not defined in
get_embedding_function.py, add them to the configuration.
- Create virtual environment:
python -m venv venv - Activate your environment:
venv\Scripts\activate(i.e., Windows) - Install needed requirements:
pip install -r requirements
- Run
python confluence_fetcher.pyto load your Confluence data. At this stage, it is transformed into markdown file, also split by sections and subsections (right) and not by fixed chunk_size (left), as shown in following picture.
- Run
python embed_data.pyto embed (save vector numerical representation) of your Confluence data in the Chroma vector database. The data will be saved as title of (sub)section with its content alongside with the link to Confluence page. This link will be incorporated in the response to enhance its transparency and reliability.
- Run
rag.pyafter adding your query there.
- To best evaluate both systems against each other:
- create a list of queries paraphrased (to test for semantic search capability) for both.
- send queries to RAG and also to Confluence.
- assign scores for the search results and run scripts as explained in more details in
rag-vs-confluenceREADME

