Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
247 commits
Select commit Hold shift + click to select a range
4ece0d0
prototype
sofiachavezb May 15, 2025
15c5eac
merge commit
sofiachavezb May 20, 2025
d8e4f03
Merge branch 'develop' into RAG
sofiachavezb Jun 8, 2025
49c5c1d
Merge branch 'project/generative-plugin' into RAG
sofiachavezb Jun 8, 2025
a4f2f27
Merge branch 'develop' into RAG
sofiachavezb Jun 24, 2025
e357306
Merge branch 'project/generative-plugin' into RAG
sofiachavezb Jun 24, 2025
1ba8382
Basic rag configuration
sofiachavezb Jun 29, 2025
5f197ac
Basic configuration via UI
sofiachavezb Jul 3, 2025
6d41d73
frontend working + documents table logic implemented
sofiachavezb Jul 15, 2025
4743239
Merge branch 'develop' into RAG
sofiachavezb Jul 15, 2025
2fa7c8f
Merge branch 'project/generative-plugin' into RAG
sofiachavezb Jul 15, 2025
96fdc39
Tables styles updated
sofiachavezb Jul 15, 2025
2a45b2a
RAG session creation updated
sofiachavezb Jul 16, 2025
6e29b77
tfidf embedding implemented as a configurable object
sofiachavezb Jul 21, 2025
46a7acc
dense retriever configuration working
sofiachavezb Sep 9, 2025
21d9872
changing from EditModelDialog to FormSchemaDialog+FormSchemaWithSelec…
sofiachavezb Sep 9, 2025
16db412
modified FormSchemaHeader
sofiachavezb Sep 9, 2025
37fb3a8
Modified EditModelDialog, logic merged into RetrieverConfigurationStep
sofiachavezb Sep 9, 2025
0d1143f
awful retriever model working
sofiachavezb Sep 12, 2025
1109f66
backup pre dev branch update
sofiachavezb Sep 16, 2025
67be2a1
Merge branch 'develop' into RAG
sofiachavezb Sep 25, 2025
259b990
WIP
sofiachavezb Sep 29, 2025
17046e6
DocumentsTable length error fix
sofiachavezb Sep 30, 2025
c7ff001
refactor: Move "New RAG Session" button to top right for consistency …
Creylay Sep 30, 2025
d6299fa
refactor: Improve code readability and formatting in ChunkingConfigur…
Creylay Oct 1, 2025
8a853ab
refactor: Simplify imports and improve code formatting in RetrieverCo…
Creylay Oct 1, 2025
c7e8258
refactor: Enhance layout styling in FormSchemaButtonGroup component
Creylay Oct 1, 2025
6f4d537
refactor: Add overflow styling to DialogContent in FormSchemaDialog c…
Creylay Oct 1, 2025
6313160
refactor: Fix formatting issues and clean up commented code in initia…
Creylay Oct 1, 2025
430277b
refactor: Add RAGPipeline to models and initial components
Creylay Oct 2, 2025
1738c5e
feat: Implement new session modal with multi-step configuration for R…
Creylay Oct 2, 2025
9d2aae9
refactor: Enhance form handling and validation in configuration compo…
Creylay Oct 2, 2025
1ce5160
renaming
sofiachavezb Oct 2, 2025
b0e9f73
typo fix + RAGPipeline register
sofiachavezb Oct 2, 2025
b10162d
Merge branch 'develop' into RAG-backend-develop
sofiachavezb Oct 2, 2025
196799b
refactor: Update RAG session models and parameters structure for cons…
Creylay Oct 2, 2025
2abec55
refactor: Modify retriever configuration behavior to allow continuous…
Creylay Oct 3, 2025
0cd2c26
refactor: Prevent automatic closure of configuration after saving ret…
Creylay Oct 3, 2025
c4cfce4
refactor: Improve document selection handling and validation in Docum…
Creylay Oct 3, 2025
1551df0
refactor: Update chunking model parameter handling and selection logi…
Creylay Oct 3, 2025
4f605f3
refactor: Enhance retrieval paradigm selection and initialization log…
Creylay Oct 3, 2025
3bde36a
refactor: Update generator model parameter handling in GeneratorConfi…
Creylay Oct 3, 2025
6af25d6
refactor: Standardize schema field handling and improve parameter def…
Creylay Oct 3, 2025
0fd4059
refactor: Improve retrieval paradigm handling and retriever selection…
Creylay Oct 3, 2025
dab0000
refactor: Clean up schema field definitions and improve formatting in…
Creylay Oct 3, 2025
ca62242
refactor: Improve code formatting and consistency in TFIDF retriever …
Creylay Oct 3, 2025
c00bd8a
refactor: Clean up import statements and improve placeholder values i…
Creylay Oct 4, 2025
a04f28d
WIP
sofiachavezb Oct 6, 2025
58568d5
Merge branch 'RAG' of https://github.com/DashAISoftware/DashAI into RAG
sofiachavezb Oct 6, 2025
5e3fe61
Prompts implemented
sofiachavezb Oct 6, 2025
6a814c8
wip
sofiachavezb Oct 7, 2025
16ecb8a
Merge branch 'RAG' into RAG-backend-develop
sofiachavezb Oct 7, 2025
b3c5231
refactor: Enhance AutoSaveFormSchema with useRef for current form val…
Creylay Oct 8, 2025
aa98e47
refactor: Enhance AutoSaveFormSchema with useRef for current form val…
Creylay Oct 8, 2025
adb923e
wip
sofiachavezb Oct 9, 2025
00f2861
Merge branch 'fix/rag-new-session-modal' into RAG-backend-develop
sofiachavezb Oct 10, 2025
2f5b221
Database schema implemented
sofiachavezb Oct 10, 2025
ef4c363
sessions creation updated
sofiachavezb Oct 10, 2025
68598eb
refactor: Improve error handling and filter RAG sessions by task name…
Creylay Oct 15, 2025
fd2825a
refactor: Simplify session state updates with useCallback and improve…
Creylay Oct 15, 2025
d129dd2
baseline
sofiachavezb Oct 16, 2025
c15a21a
Merge branch 'RAG' of https://github.com/DashAISoftware/DashAI into RAG
sofiachavezb Oct 16, 2025
700ed52
Merge branch 'RAG-backend-develop' into RAG
sofiachavezb Oct 16, 2025
63af25e
baseline
sofiachavezb Oct 16, 2025
e0b0287
refactor: Integrate useRef for retriever step management and enhance …
Creylay Oct 16, 2025
2a44c95
Merge branch 'develop' into RAG
sofiachavezb Oct 17, 2025
c73c49f
pipelines working
sofiachavezb Oct 17, 2025
08c3282
refactor: Enhance form value handling and logging in NewSessionModal …
Creylay Oct 16, 2025
61fdbc3
refactor: Improve date formatting and optimize column definitions in …
Creylay Oct 20, 2025
6ce5ce5
refactor: Remove unnecessary console logs and clean up code in NewSes…
Creylay Oct 20, 2025
f495a71
refactor: Integrate session name generation and enhance session handl…
Creylay Oct 20, 2025
46398b6
refactor: Sort documents by creation date when loading in DocumentSel…
Creylay Oct 21, 2025
4925b04
refactor: Implement pagination for document selection and improve UI …
Creylay Oct 21, 2025
bb8e6d4
refactor: Replace custom table implementation with DataGrid for impro…
Creylay Oct 21, 2025
6918936
refactor: Adjust column width and enhance scrollbar styles in Documen…
Creylay Oct 21, 2025
8b376e2
refactor: Improve styling for remove action button in DocumentSelecti…
Creylay Oct 21, 2025
e393526
refactor: Integrate DeleteItemModal for document removal confirmation…
Creylay Oct 21, 2025
a644f03
refactor: Add PromptConfigurationStep to NewSessionModal steps
Creylay Oct 21, 2025
d9593ff
refactor: Implement PromptConfigurationStep for improved session conf…
Creylay Oct 21, 2025
da2f369
refactor: Add endpoint to retrieve all available RAG prompts with err…
Creylay Oct 21, 2025
192ab64
refactor: Add getRAGPrompts function to fetch RAG prompts with error …
Creylay Oct 21, 2025
9181533
refactor: Clean up code formatting and improve readability in models.py
Creylay Oct 22, 2025
3395e26
refactor: Add optional name field to RAGPrompt model and set default …
Creylay Oct 22, 2025
c4fec69
refactor: Add optional fields for created date and last modified date…
Creylay Oct 23, 2025
c2119a5
refactor: Include name, created, and last modified fields in get_all_…
Creylay Oct 23, 2025
e484c99
refactor: Implement TemplateModal and integrate with PromptSelectionT…
Creylay Oct 23, 2025
39a107d
Merge branch 'develop' into RAG
sofiachavezb Oct 23, 2025
10a91b9
feat: Add NewPromptModal component and integrate with PromptSelection…
Creylay Oct 23, 2025
569cc18
Fixes
sofiachavezb Oct 23, 2025
2cab302
added a fixed prompt to use while prompt configuration is developed
sofiachavezb Oct 23, 2025
11c848b
mini fix in documents table
sofiachavezb Oct 23, 2025
231f81f
feat: Add prompt type selection and template loading in NewPromptModal
Creylay Oct 23, 2025
9165d95
model name typo fixed
sofiachavezb Oct 23, 2025
006608a
feat: Add endpoint to create new RAGPrompt entries in the database
Creylay Oct 23, 2025
4e89d3c
feat: Add RAGPromptSchema model for prompt data validation
Creylay Oct 23, 2025
e29fe84
feat: Implement createRAGPrompt function for creating new RAG prompts
Creylay Oct 23, 2025
b97da26
feat: Update TemplateModal title and integrate prompt creation in New…
Creylay Oct 23, 2025
f822d29
feat: Update prompt selection logic to set next step enabled state ba…
Creylay Oct 23, 2025
24993fc
Prompt instantiation using db ids
sofiachavezb Oct 23, 2025
daad29c
Merge branch 'feature/rag-configurable-prompts' into RAG
sofiachavezb Oct 23, 2025
f44e445
feat: Refactor getPromptChildren to handle multiple prompt types and …
Creylay Oct 24, 2025
f5f470d
feat: Update API call in NewPromptModal to use getPromptChildren for …
Creylay Oct 24, 2025
87d34ea
fix: Correct valueFormatter to valueGetter for date formatting in Pro…
Creylay Oct 24, 2025
de0c063
feat: Add required and optional placeholders display in NewPromptModa…
Creylay Oct 24, 2025
dd93651
feat: Enhance display of required and optional placeholders in NewPro…
Creylay Oct 24, 2025
8aef3c7
feat: Implement validation for required placeholders in NewPromptModa…
Creylay Oct 24, 2025
35de74b
feat: Refactor placeholder display in NewPromptModal to use Placehold…
Creylay Oct 24, 2025
c2c35df
refactor: Remove unused imports in NewPromptModal for cleaner code
Creylay Oct 24, 2025
136f22c
feat: Add default prompt name generation in NewPromptModal and pass e…
Creylay Oct 24, 2025
2457411
feat: Reset prompt name, type, and template on modal open for better …
Creylay Oct 24, 2025
28eba83
refactor: Rename getPromptChildren to getCustomPrompts and filter out…
Creylay Oct 24, 2025
02f8ee2
feat: Pass new prompt ID to onPromptCreated and update session data i…
Creylay Oct 24, 2025
61d685c
feat: Add prompts endpoint for creating and retrieving RAG prompts
Creylay Oct 29, 2025
2cac948
Merge branch 'develop' into RAG
sofiachavezb Oct 29, 2025
567fcee
feat: Enhance document retrieval and download functionality with impr…
Creylay Oct 29, 2025
4f67ab2
feat: Add document preview functionality with modal support for PDF a…
Creylay Oct 29, 2025
a7372b6
feat: Map file_url to preview and add crude file type detection in Do…
Creylay Oct 29, 2025
373c842
OpenAI LLMs wrapper + use of completions in generation
sofiachavezb Oct 30, 2025
cd2023b
Merge branch 'RAG' of https://github.com/DashAISoftware/DashAI into RAG
sofiachavezb Oct 30, 2025
f265e45
feat: Implement DocumentPreviewModal for improved document preview fu…
Creylay Oct 30, 2025
0479dcc
feat: Enhance DocumentTable with file_url mapping and file type detec…
Creylay Oct 30, 2025
c94ac7d
feat: Adjust column flex values in DocumentTable and RAGSessionsTable…
Creylay Nov 3, 2025
9b99779
feat: Add session removal functionality to RAGHomePage and RAGSession…
Creylay Nov 3, 2025
7978617
feat: Pass sessions and setSessions props to RAGHomePage for session …
Creylay Nov 3, 2025
e47dc9e
feat: Refactor DocumentTable column flex values for improved layout
Creylay Nov 3, 2025
9d2f785
refactor: Clean up formatting and improve code readability in Upload …
Creylay Nov 3, 2025
f62a5d2
feat: Update session and document data structures for improved consis…
Creylay Nov 3, 2025
ec5794f
feat: Adjust column flex values in RAGSessionsTable for improved layout
Creylay Nov 3, 2025
4bd12ff
fix: Remove setNextEnabled from useEffect dependencies and ensure sel…
Creylay Nov 3, 2025
037e267
fix: Improve generator loading logic and ensure formik values are upd…
Creylay Nov 3, 2025
76bbab5
fix: Update Grid component usage for improved layout consistency in U…
Creylay Nov 3, 2025
836144b
fix: Update Grid component properties for better responsive layout in…
Creylay Nov 3, 2025
1a20ca9
fix: Remove setNextEnabled from useEffect dependencies in ChunkingCon…
Creylay Nov 3, 2025
1ac3399
fix: Set default values for props in IntegerInput and SelectInput com…
Creylay Nov 3, 2025
9161cab
fix: Refactor NumberInput component to set default values for props
Creylay Nov 3, 2025
2a8040d
fix: Enhance InfoSessionModal to display object and array values in s…
Creylay Nov 3, 2025
671d3da
fix: Optimize formik value updates and validation checks in Generator…
Creylay Nov 3, 2025
ffdac1d
fix: Remove unnecessary dependencies from useEffect in PromptConfigur…
Creylay Nov 3, 2025
869b469
fix: Remove default prompt model parameters from upload_generative_se…
Creylay Nov 4, 2025
e18cbbd
fix: Update propTypes in DocumentSelector to accept both string and n…
Creylay Nov 4, 2025
5c98c6d
fix: Update RAGSessionsTable title to 'Current RAG Sessions' and pass…
Creylay Nov 4, 2025
ac04e6b
feat: Add upload button and conditional title display in DocumentTabl…
Creylay Nov 4, 2025
fcf3bc4
feat: Implement document upload functionality in DocumentTable and in…
Creylay Nov 4, 2025
38d7853
prompt optional placeholders removed
sofiachavezb Nov 4, 2025
63069b6
fix: Sort documents by creation date before passing to DocumentTable
Creylay Nov 4, 2025
19551d2
feat: Add placeholder text and shrink label for prompt template input…
Creylay Nov 5, 2025
275dbd6
feat: Update title and add description in PromptSelectionTable for cl…
Creylay Nov 5, 2025
0d0b712
feat: Add PromptSelectionTable to RAGHomePage for prompt management
Creylay Nov 5, 2025
f11c780
fix: Correct capitalization in the title of RAGSessionsTable
Creylay Nov 5, 2025
dfdbf04
fix: Improve code formatting and consistency in OpenAI text generatio…
Creylay Nov 5, 2025
666274d
refactor: Simplify GeneratorConfigurationStep component and improve s…
Creylay Nov 5, 2025
9dc9c13
fix: Improve error handling and validation message in TextInput compo…
Creylay Nov 5, 2025
310dddc
fix: Enhance TFIDFRetriever schema and improve code formatting for cl…
Creylay Nov 5, 2025
544ee1d
feat: Add DocumentsBar component and integrate it into Generative page
Creylay Nov 6, 2025
5d6d16d
feat: Add endpoint to retrieve documents by RAG session and update Do…
Creylay Nov 6, 2025
21c6e03
feat: Add getSessionDocuments function to retrieve documents by sessi…
Creylay Nov 6, 2025
6c1dc26
fix: Add missing file_type property to IDocumentResponse interface
Creylay Nov 6, 2025
76b261a
feat: Implement DocumentsBar and DocumentList components for document…
Creylay Nov 6, 2025
faf6a76
refactor: Remove DocumentsBar component as part of code cleanup
Creylay Nov 6, 2025
a634fc3
feat: Add document preview functionality to DocumentList and Document…
Creylay Nov 6, 2025
85eae93
Merge branch 'RAG' of https://github.com/DashAISoftware/DashAI into RAG
sofiachavezb Nov 6, 2025
ca87619
refactor: Simplify DocumentListItem layout and update color mapping f…
Creylay Nov 6, 2025
ec15efa
refactor: Update session loading logic to preserve non-RAG sessions a…
Creylay Nov 6, 2025
8536685
feat: Add validation for chunk_overlap in CharacterChunkModelSchema a…
Creylay Nov 6, 2025
311c7a3
factories implementation
sofiachavezb Nov 7, 2025
4404e00
Merge branch 'RAG' of https://github.com/DashAISoftware/DashAI into RAG
sofiachavezb Nov 7, 2025
2e21400
reference display
sofiachavezb Nov 7, 2025
82cda38
minor fixes
sofiachavezb Nov 7, 2025
6f3dd24
feat: Enhance parameter handling in Chunking and Generator configurat…
Creylay Nov 8, 2025
ab086dd
fix: Improve placeholder handling in generator parameter initialization
Creylay Nov 8, 2025
79cd1ac
RAG navigation enhanced
sofiachavezb Nov 13, 2025
f43c9f3
sources display
sofiachavezb Nov 13, 2025
129ef63
Sources display implemented
sofiachavezb Nov 13, 2025
c5b74ed
Prompt types selection discarded
sofiachavezb Nov 14, 2025
950bcc8
Fix typo in new prompt modal
sofiachavezb Nov 14, 2025
a3d4a70
Last UI fixes and improvements
sofiachavezb Nov 20, 2025
973927b
deleted folder for renaming
sofiachavezb Nov 20, 2025
b2fd826
folders renamed
sofiachavezb Nov 20, 2025
87e75b5
Update requirements.txt
sofiachavezb Nov 20, 2025
a055a59
FIX: retriever default values after selection change
sofiachavezb Nov 20, 2025
7772b77
Confirmation dialog when the user tries to close the new session modal
sofiachavezb Nov 20, 2025
6a1e1bb
Merge branch 'develop' into RAG
sofiachavezb Nov 20, 2025
76b7ddc
layout fixes
sofiachavezb Nov 20, 2025
b1c6e9c
Added larger qwen models
sofiachavezb Nov 20, 2025
e92bbba
description update
sofiachavezb Nov 25, 2025
68abc40
pre-update
sofiachavezb Apr 16, 2026
777b27b
Merge branch 'develop' into RAG
sofiachavezb Apr 16, 2026
87c960d
back update and front import fixes
sofiachavezb Apr 19, 2026
c70cd32
navigation to RAG home page
sofiachavezb Apr 19, 2026
9b71c8c
FIX: sessions bar navigation across RAG and non-RAG tasks
sofiachavezb Apr 19, 2026
1e08bae
Update: open RAG session summary
sofiachavezb Apr 19, 2026
219e30d
FIX: error when opening a RAG session chat from /app/generative
sofiachavezb Apr 19, 2026
9e7da60
FIX schema render errors in RAG module
sofiachavezb Apr 19, 2026
80dc0eb
Fix navigation in RAG sessions in front and RAG models missing train …
sofiachavezb Apr 20, 2026
bef1c81
Fix Retreival typo
sofiachavezb Apr 22, 2026
616daf7
ADD simplified RAG wireframes
sofiachavezb Apr 24, 2026
7649302
Merge develop into RAG branch - resolve conflicts
sofiachavezb Apr 24, 2026
413e84c
UPDATE: RAG tables added to ALembic
sofiachavezb Apr 24, 2026
a0ea670
RAG documents table and bar update
sofiachavezb Apr 27, 2026
03c37f3
ADD simplified RAG session configuration
sofiachavezb Apr 28, 2026
d29d654
FIX default RAG session name
sofiachavezb Apr 28, 2026
4c9503b
FIX: Document table flickering and navigation after session creation
sofiachavezb Apr 29, 2026
e9f1410
ADD prompt creation and session name verification
sofiachavezb Apr 29, 2026
0f7127c
FIX: RAG nested model configuration
sofiachavezb Apr 29, 2026
761b53f
ADD translation to Spanish (LLM, not supervised)
sofiachavezb Apr 29, 2026
ee22dbc
UPDATE spanish translation
sofiachavezb Apr 29, 2026
56d74a5
FIX sessions navigation issue
sofiachavezb Apr 29, 2026
3f278d5
Update: RAG layout
sofiachavezb May 2, 2026
fe786e7
ADD RAG parameters update
sofiachavezb May 11, 2026
8a0be6e
FIX RAG session parameters update bug
sofiachavezb May 11, 2026
b4ad56f
UPDATE RAG side panels
sofiachavezb May 11, 2026
641195f
DELETE unnecessary residual file
sofiachavezb May 11, 2026
992f84d
UPDATE: show chunks sizes in characters and tokens approx
sofiachavezb May 13, 2026
dc10c86
Update: text style in RAG preset cards
sofiachavezb May 13, 2026
130067d
UPDATE RAG session configuration cards
sofiachavezb May 13, 2026
745b410
FIX: components spacing
sofiachavezb May 14, 2026
591f343
ADD RAG components documentation
sofiachavezb May 14, 2026
dfdcea8
Delete RAG legacy view and migrate Simplified RAG view
sofiachavezb May 14, 2026
75d17fd
FIX: Document preview after upload in-session
sofiachavezb May 14, 2026
d23fecb
FIX RAG session name suggestion
sofiachavezb May 14, 2026
bc55dc6
Minor interface layout spacing changes
sofiachavezb May 19, 2026
5ec9b10
Merge branch 'develop' into RAG
sofiachavezb May 22, 2026
d587f26
Update from main
sofiachavezb May 22, 2026
df9effe
Refactor + ADD composite retrievers (testing WIP)
sofiachavezb May 28, 2026
7698a3d
Fix: style mismatch in RAG session config
sofiachavezb May 28, 2026
8c7551e
Update documentation
sofiachavezb May 28, 2026
63c1aa0
Retrievers refactor WIP
sofiachavezb Jun 2, 2026
77cac8d
Retriever refactor WIP: minimal pipeline working
sofiachavezb Jun 2, 2026
2efbd5d
Retreivers refactor: Embeddings families split
sofiachavezb Jun 2, 2026
9cb46ee
Fix: params management in session creation
sofiachavezb Jun 2, 2026
5063488
ADD: Advanced retriever configuration text descriptions
sofiachavezb Jun 2, 2026
92226eb
Merge pull request #715 from DashAISoftware/develop
cristian-tamblay Jun 24, 2026
d8af22f
Merge pull request #721 from DashAISoftware/develop
cristian-tamblay Jun 24, 2026
af8ec3c
Merge pull request #745 from DashAISoftware/develop
cristian-tamblay Jun 29, 2026
f5734b5
tests added
sofiachavezb Jul 6, 2026
b459c40
Merge remote-tracking branch 'origin/production' into RAG
sofiachavezb Jul 7, 2026
c192f1d
Several UI improvements
sofiachavezb Jul 8, 2026
c683d0c
Advanced configuration buttons minor improvements
sofiachavezb Jul 8, 2026
dbf5b3f
Frontend codebase cleanup
sofiachavezb Jul 8, 2026
f8e7fd0
code cleaned (minor changes)
sofiachavezb Jul 9, 2026
2a8501f
'rag' renamed to 'RAG'
sofiachavezb Jul 9, 2026
9450781
FIX prompt section bug
sofiachavezb Jul 10, 2026
5c9b40f
traslation improved
sofiachavezb Jul 10, 2026
558e637
unnecesary comments remvoed
sofiachavezb Jul 10, 2026
c8e0ef1
FIX Sources display overlap
sofiachavezb Jul 10, 2026
2a2c6ed
hardcoded styles properties removed
sofiachavezb Jul 10, 2026
43c82cc
FIX instructor embedding schema mismatch
sofiachavezb Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ dvclive
# MacOS
*.DS_Store

.prettierrc

*.ipynb
*.pkl
job_queue.db-shm
job_queue.db-wal

Expand All @@ -202,3 +206,8 @@ docs/node_modules/
!docs/docs/build/**
!docs/i18n/**/build/
!docs/i18n/**/build/**

**/csv-train.arrow
**/dataset_info.json

/RAG_benchmark
126 changes: 126 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# AGENTS.md

This file provides guidance to AI coding agents when working with code in this repository.

## What is DashAI

DashAI is a desktop/web graphical toolbox for training, evaluating, and deploying ML models. FastAPI backend + React frontend, optionally wrapped in PyWebView for a native desktop window. Python >= 3.10.

## Commands

### Backend

```bash
pip install -e . -r requirements-dev.txt
pre-commit install

# Run dev server
python -m DashAI --no-browser --logging-level DEBUG

# Lint / format (must pass both before committing)
ruff check --fix
ruff format

# Run all tests (in-memory SQLite — no setup needed)
pytest tests/

# Run a single test
pytest tests/back/api/test_components_api.py -v
pytest tests/back/api/test_components_api.py::test_function_name -v

# Database migrations (auto-runs on startup)
alembic upgrade head
```

### Frontend

```bash
cd DashAI/front

yarn install # requires Node LTS + Yarn 3.5.0 (enforced by packageManager)
yarn start # dev server on http://localhost:3000 (eslint disabled)
yarn build # eslint disabled
yarn test # eslint disabled
yarn test FileName.test.tsx
yarn lint # runs eslint explicitly (uses eslint.config.js)
```

**Important:** `start`, `build`, and `test` scripts all set `DISABLE_ESLINT_PLUGIN=true`. ESLint only runs via the dedicated `yarn lint` command. Prettier is configured in `DashAI/front/.prettierrc` and runs via pre-commit.

## Architecture

```
Browser / PyWebView
→ React (port 3000 dev / port 8000 prod)
→ FastAPI (/api/v1/...)
→ Service layer → SQLite (SQLAlchemy + Alembic)
→ Huey job queue (async: training, conversion, exploration)
```

The frontend polls `/api/v1/jobs/{job_id}` for long-running task status.

## Key files

| Path | Purpose |
|------|---------|
| `DashAI/__main__.py` | CLI entry point (typer). Starts uvicorn + Huey consumer subprocess |
| `DashAI/back/app.py` | FastAPI `create_app` factory |
| `DashAI/back/container.py` | DI container (`kink`) — config, DB engine, ComponentRegistry, job queue |
| `DashAI/back/initial_components.py` | **Registers all components on startup.** Add new ML components here in `get_initial_components()` |
| `DashAI/back/dependencies/config_builder.py` | Builds config dict (paths, logging, calls `get_initial_components()`) |
| `DashAI/back/dependencies/registry/component_registry.py` | `ComponentRegistry` — resolves components by name string |
| `DashAI/back/api/api_v1/endpoints/` | REST endpoints — each file is a FastAPI router |
| `DashAI/back/api/api_v1/api.py` | Mounts all endpoint routers on `api_router_v1` |
| `DashAI/back/core/schema_fields/` | Type system driving dynamic frontend forms |
| `DashAI/back/pipeline/` | DAG pipeline nodes |
| `DashAI/back/plugins/` | Plugin system (PyPI packages with `dashai.plugins` entry point) |
| `DashAI/front/src/components/configurableObject/` | Auto-generates forms from backend component schemas |
| `DashAI/front/src/pages/generative/SessionRouter.jsx` | Routes `/app/generative/sessions/:id` to RAG or non-RAG view based on session `task_name` |
| `DashAI/front/src/pages/generative/RAGSession/` | RAG session setup wizard (RAGSessionSetup) + collapsible section components per pipeline stage |
| `DashAI/front/src/pages/generative/RAGSession/sections/` | Per-stage components: ChunkingSection, RetrieverSection, GeneratorSection, PromptSection |
| `DashAI/front/src/pages/generative/RAGSession/advanced/` | Advanced configuration modals: CompositeRetrieverBuilder, ChunkingConfigurationStep, RetrieverConfigurationStep, etc. |
| `DashAI/front/src/pages/generative/RAGSession/components/` | Reusable bodies: GeneratorBody, PromptBody, PresetCard, AdvancedConfigCard |

## Key patterns

**ComponentRegistry** — all ML components (models, metrics, converters, dataloaders, explorers, explainers, tasks, optimizers, jobs, pipeline nodes) are registered at startup and resolved by name string. To add a new component: subclass the relevant base, define its schema, and add it to `get_initial_components()` in `DashAI/back/initial_components.py`.

**Schema / type system** — every component declares parameters using `BaseSchema` + field classes (`IntField`, `FloatField`, `ComponentField`, `UnionType`, etc.) with `MultilingualString` labels. The frontend uses these schemas to auto-generate configuration forms.

**Dependency injection (`kink`)** — singletons (config, DB engine, ComponentRegistry, job queue) live in the `di` container. Use `@inject` to receive them. Config is accessed as `di["config"]` and includes `INITIAL_COMPONENTS`.

**Huey job queue** — in dev mode the Huey consumer runs as a subprocess spawned from `__main__.py`; in PyInstaller bundles it runs as a daemon thread due to limitations with frozen executables.

## RAG Module

DashAI includes a **Retrieval-Augmented Generation (RAG)** module — a 4-stage pipeline (Document Loading → Chunking → Retrieval → Generation) for chatting with your documents.

- **Backend:** `DashAI/back/models/RAG/` — pipeline orchestrator (RAGPipeline), abstract factory (RAGModelsFactory), sub-factories for prompts/chunking/retrievers/LLMs, retriever repository (all SQL), document loader, chunk-set caching.
- **Frontend:** `DashAI/front/src/pages/generative/RAGSession/` — session setup wizard (RAGSessionSetup, RAGSessionPage) with stage sections (ChunkingSection, RetrieverSection, GeneratorSection, PromptSection) and advanced config modals.
- **Jobs:** `RAGJob` extends `GenerativeJob` to run the RAG pipeline as a background task.
- **Full docs (backend + frontend):** See [`docs/rag/`](./docs/rag/) for architecture, data models, retrievers, pipeline orchestration, frontend architecture, testing guide, and known constraints.

## Testing

- Backend tests use in-memory SQLite — no setup needed.
- Key fixtures in `tests/back/conftest.py`: `test_path`, `test_datasets_path`, `test_job_queue`.
- Job queue tests: `test_job_queue.set_test_mode(immediate=True)` runs tasks synchronously.
- API tests use FastAPI `TestClient` defined in `tests/back/api/conftest.py` (module-scoped).
- Frontend test command passes `--passWithNoTests` in CI.

## Adding new things

**New ML model or converter:** subclass `BaseModel` / `BaseConverter`, define schema, register in `DashAI/back/initial_components.py::get_initial_components()`.

**New API endpoint:** add file in `DashAI/back/api/api_v1/endpoints/`, include its router in `DashAI/back/api/api_v1/api.py`.

**New async job:** subclass `BaseJob`, dispatch via `job_queue.enqueue(...)`, track status through jobs API.

## Data at runtime

Default `~/.DashAI/` (overridable via `DASHAI_LOCAL_PATH` env var):
`datasets/`, `runs/`, `explanations/`, `notebooks/`, `images/`, `documents/`, `rag/`, `sqlite.db`

## CI

Only a `publish.yml` workflow exists (on push to `production` branch). It builds the frontend, publishes to PyPI, and builds Windows/macOS installers. No CI test workflow is defined.
5 changes: 3 additions & 2 deletions DashAI/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@


def open_browser() -> None:
_wait_for_backend_server(timeout=120)
_wait_for_backend_server(timeout=1200)
url = "http://localhost:8000/app/"
webbrowser.open(url=url, new=0, autoraise=True)

Expand Down Expand Up @@ -119,10 +119,11 @@ def _wait_for_backend_server(host="127.0.0.1", port=8000, timeout=15):
import socket
import time

timeout = 1000
start_time = time.time()
while time.time() - start_time < timeout:
try:
with socket.create_connection((host, port), timeout=1):
with socket.create_connection((host, port), timeout=timeout):
return True
except (OSError, ConnectionRefusedError):
time.sleep(0.5)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""Merge RAG and production heads

Revision ID: 8d5416cac8f1
Revises: d4e5f6a7b8c9, f1a2b3c4d5e6
Create Date: 2026-07-06 12:30:00.000000

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '8d5416cac8f1'
down_revision: Union[str, None] = ('d4e5f6a7b8c9', 'f1a2b3c4d5e6')
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
pass


def downgrade() -> None:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"""add composite retriever support

Revision ID: a1b2c3d4e5f6
Revises: f928e0b5203d
Create Date: 2026-05-22 12:00:00.000000

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'a1b2c3d4e5f6'
down_revision: Union[str, None] = 'f928e0b5203d'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
with op.batch_alter_table('rag_retriever', schema=None) as batch_op:
batch_op.drop_constraint('chk_retriever_type', type_='check')
batch_op.add_column(
sa.Column('composite_child_ids', sa.JSON(), nullable=True)
)
batch_op.create_check_constraint(
'chk_retriever_type',
'NOT (dense_retriever_id IS NOT NULL AND sparse_retriever_id IS NOT NULL)'
)


def downgrade() -> None:
with op.batch_alter_table('rag_retriever', schema=None) as batch_op:
batch_op.drop_constraint('chk_retriever_type', type_='check')
batch_op.drop_column('composite_child_ids')
batch_op.create_check_constraint(
'chk_retriever_type',
(
"(class_name = 'SparseRetriever' "
"AND sparse_retriever_id IS NOT NULL "
"AND dense_retriever_id IS NULL) OR "
"(class_name = 'DenseRetriever' "
"AND dense_retriever_id IS NOT NULL "
"AND sparse_retriever_id IS NULL)"
)
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
"""add uniqueness constraints to rag tables and fix storage tracing

Revision ID: b2c3d4e5f6a7
Revises: a1b2c3d4e5f6
Create Date: 2026-05-25 12:00:00.000000

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


revision: str = 'b2c3d4e5f6a7'
down_revision: Union[str, None] = 'a1b2c3d4e5f6'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ── Chunk: replace useless (id, document_id) with (document_id, chunk_index, chunking_model_id) ──
with op.batch_alter_table('chunk', schema=None) as batch_op:
batch_op.drop_constraint('uix_chunk_document', type_='unique')
batch_op.create_unique_constraint(
'uix_document_chunk_index_chunking',
['document_id', 'chunk_index', 'chunking_model_id'],
)

# ── RAGPrompt ──
with op.batch_alter_table('rag_prompt', schema=None) as batch_op:
batch_op.create_unique_constraint(
'uix_rag_prompt_class_params',
['class_name', 'parameters'],
)

# ── RAGGenerationModel ──
with op.batch_alter_table('rag_generation_model', schema=None) as batch_op:
batch_op.create_unique_constraint(
'uix_rag_gen_model_class_params',
['class_name', 'parameters'],
)

# ── RAGChunkingModel ──
with op.batch_alter_table('rag_chunking_model', schema=None) as batch_op:
batch_op.create_unique_constraint(
'uix_rag_chunking_model_class_params',
['class_name', 'parameters'],
)

# ── RAGEmbeddingModel ──
with op.batch_alter_table('rag_embedding_model', schema=None) as batch_op:
batch_op.create_unique_constraint(
'uix_rag_embedding_model_class_params',
['class_name', 'parameters'],
)

# ── RAGSparseRetriever ──
with op.batch_alter_table('rag_sparse_retriever', schema=None) as batch_op:
batch_op.create_unique_constraint(
'uix_rag_sparse_retriever',
['class_name', 'parameters', 'documents_ids', 'chunking_model_id'],
)

# ── RAGDenseRetriever ──
with op.batch_alter_table('rag_dense_retriever', schema=None) as batch_op:
batch_op.create_unique_constraint(
'uix_rag_dense_retriever',
['class_name', 'parameters', 'document_ids',
'chunking_model_id', 'embedding_model_id'],
)


def downgrade() -> None:
with op.batch_alter_table('rag_dense_retriever', schema=None) as batch_op:
batch_op.drop_constraint('uix_rag_dense_retriever', type_='unique')

with op.batch_alter_table('rag_sparse_retriever', schema=None) as batch_op:
batch_op.drop_constraint('uix_rag_sparse_retriever', type_='unique')

with op.batch_alter_table('rag_embedding_model', schema=None) as batch_op:
batch_op.drop_constraint('uix_rag_embedding_model_class_params', type_='unique')

with op.batch_alter_table('rag_chunking_model', schema=None) as batch_op:
batch_op.drop_constraint('uix_rag_chunking_model_class_params', type_='unique')

with op.batch_alter_table('rag_generation_model', schema=None) as batch_op:
batch_op.drop_constraint('uix_rag_gen_model_class_params', type_='unique')

with op.batch_alter_table('rag_prompt', schema=None) as batch_op:
batch_op.drop_constraint('uix_rag_prompt_class_params', type_='unique')

with op.batch_alter_table('chunk', schema=None) as batch_op:
batch_op.drop_constraint('uix_document_chunk_index_chunking', type_='unique')
batch_op.create_unique_constraint(
'uix_chunk_document',
['id', 'document_id'],
)
Loading
Loading