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
* Add RAG module under benchmarking
* Imported RAG - first edit to MultiAgentTester
* changes to files rag
* RAG model working draft
* improved format
* HTTPclient change - unfixed
* more prelim changes to the rag model
* initial working prototype revised
* added in functions.json and embeddings.json
* extracted from scib lib
* a better working draft of the rag
* more changes to rag
* small change
* finally no errors!
* more changes made
* added new extractor class
* trying to get scanpy to work
* scanpy works
* working proto for scanpy and scib-metrics
* just added type annotations
* trying to resolve json error
* decent working ver before signing off
* Deleted embeddings.json and functions.json
* remove json
* making sure file is safe
* fixed issue by changing to jsonl
* experimenting around with wikipedia lib
* fixeS?
* added umap with new prompts
* fixed umap
* reverted back to the technique with urls
* fixed error
* added some visualization in umap and heatmap
* added fixes to rag file
* file finalized for 2day
* added variations to chunking
* created a series of images to test
* varying wiki +description contents
* diff sizes of wiki page
* more variations
* trying with a bigger embedding model
* trying wiki api
* working implementation -not helpful
* trying to aggresively remove stuff from the wiki result
* trying to aggresively remove more
* fixing bugs
* trying to make a new ver work
* small syntax error
* draft
* switched out wiki lib for beautiful soup extraction + switched model
* working version yayy
* rag file
* working version of the rag class system
* new file for user purposes!
* changes to user and skeleton ver
* added a new function to extract wiki content
* attempt to fix
* fixes and clean up
* fixes and clean ups ongoing
* file improvisations with request failsafe
* resolved critical errors
* testing
* new fixes
* removed embedding and functions file
* fixing shennanigans
* moved files
* changes to file in type annotations
* made more fixes to rag class by adding 1 function for the entire pipeline
* took back some fixes that introduced errors
* changed text to string type in func_Def
* regex for improvements to extracting html
* introduced more aggressive regex for cleaning func def
* added support for dict objects
* type annotations changed + dict incorporated
* errors fixed
* quick fixes to rag file
* more changes for error correction
* deleted folder from wrong location
* moved locations for rag folder
* improper folder placement
* moved locations
* making changes to the runner.py file system
* moved rag
* rag + changes to runner
* one working version of implementation of rag - using agents
* dylan's proposed version of the implementation
* attempts at rag implementation
* Added rag support to agent system
* query function from database by function signature search
* changed function definition search to function signature search
* fixed rag implementation
* may have fixed import, need to consult and fix file
* potentially error fix
* fixed imports
* working with dylans location of rag folder
* userrag file deemed unnecessary and deleted
* change to file names and locations - more clean up, fixed imports
* user rag file changed
* Update system_blueprint.json
* changes to imports and file structures
* finally fixed import situation
* tested code
* trivial errors
* trivial errors
* Update RetrievalAugmentedGeneration.py
* Fixed rag implementation
* small UX fixes
* added in new embeddings
* embeddings and functions file created - however the search results from wikipedia are not accurate
* fixed embedding file structure
* need to fix wikipedia
* restructured embeddings.jsonl to signature and embedding + added in query relevance
* Synced New Embeddings and Functions
---------
Co-authored-by: djriffle <djriffle1@gmail.com>
full_prompt+=f"\n - Description: Retrieves relevant information about a specific <function> from your knowledge base. Replace <function> with a concise, descriptive search query (e.g., function names, task you are trying to complete)."
58
+
full_prompt+=f"\n - Example: `query_rag_<scvi model setup>`"
Copy file name to clipboardExpand all lines: cli/olaf/src/olaf/agents/integration_system.json
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
"global_policy": "Always be concise, professional, and helpful. Do not refuse to answer a request unless it is harmful.",
3
3
"agents": {
4
4
"master_agent": {
5
+
"rag": {
6
+
"enabled": true
7
+
},
5
8
"prompt": "You are the master agent. Analyze every user request and delegate the task to the appropriate expert: the general coder for standard single-cell analysis or the integration expert for batch correction and data integration tasks. Respond ONLY with a delegation command.",
6
9
"neighbors": {
7
10
"delegate_to_general": {
@@ -16,6 +19,9 @@
16
19
},
17
20
"general_coder": {
18
21
"prompt": "You are the *general scRNA-seq coder*. You handle standard single-cell analysis tasks like data loading, QC, filtering, normalization, and basic plotting using scanpy. You are not an expert in data integration.\n\nExample of a task you would perform:\n```python\nimport scanpy as sc\n\n# Assume 'adata' is a loaded AnnData object\n# Basic QC and filtering\nsc.pp.filter_cells(adata, min_genes=200)\nsc.pp.filter_genes(adata, min_cells=3)\nadata.var['mt'] = adata.var_names.str.startswith('MT-')\nsc.pp.calculate_qc_metrics(adata, qc_vars=['mt'], inplace=True)\n\n# Normalize and find highly variable genes\nsc.pp.normalize_total(adata, target_sum=1e4)\nsc.pp.log1p(adata)\nsc.pp.highly_variable_genes(adata, min_mean=0.0125, max_mean=3, min_disp=0.5)\n\n# Run PCA\nsc.tl.pca(adata, svd_solver='arpack')\n\nprint('Standard analysis complete. PCA is in adata.obsm[\"X_pca\"].')\n```",
22
+
"rag": {
23
+
"enabled": true
24
+
},
19
25
"neighbors": {
20
26
"delegate_to_master": {
21
27
"target_agent": "master_agent",
@@ -29,6 +35,9 @@
29
35
},
30
36
"integration_expert": {
31
37
"prompt": "You are the *integration expert*. You specialize in combining multiple single-cell datasets and correcting for batch effects using scvi-tools.\n\nExample of a task you would perform:\n```python\nimport scvi\nimport scanpy as sc\n\n# Assume 'adata' is loaded and preprocessed with a 'batch' column\n# Find highly variable genes across batches for integration\nsc.pp.highly_variable_genes(\n adata,\n n_top_genes=2000,\n subset=True,\n layer='counts',\n flavor='seurat_v3',\n batch_key='batch'\n)\n\n# Set up the AnnData object for the scVI model\nscvi.model.SCVI.setup_anndata(adata, layer='counts', batch_key='batch')\n\n# Create and train the scVI model\nmodel = scvi.model.SCVI(adata, n_layers=2, n_latent=30)\nmodel.train()\n\n# Store the integrated latent representation in the AnnData object\nadata.obsm['X_scVI'] = model.get_latent_representation()\n\nprint('Integration complete. Integrated embedding is in adata.obsm[\"X_scVI\"].')\n``` you remeber to wrap your code in triple backticks and python. Please only include one code block per response. Remeber to keep responses short and to the point.",
Copy file name to clipboardExpand all lines: cli/olaf/src/olaf/agents/system_blueprint.json
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,9 @@
3
3
"agents": {
4
4
"master_agent": {
5
5
"prompt": "You are the master agent. Your primary role is to analyze incoming user requests and delegate them to the appropriate specialist agent. You do not perform tasks yourself.",
6
+
"rag": {
7
+
"enabled": true
8
+
},
6
9
"neighbors": {
7
10
"delegate_to_coder": {
8
11
"target_agent": "coder_agent",
@@ -16,14 +19,20 @@
16
19
},
17
20
"coder_agent": {
18
21
"prompt": "You are a specialist single cell RNA coder agent. Your job is to write high-quality, executable code based on the user's request. You do not delegate tasks. The machine you run on has write disabled. You should never save to disk or modify files. Prioritize small step responses and avoid large code dumps.",
22
+
"rag": {
23
+
"enabled": true
24
+
},
19
25
"neighbors": {},
20
26
"code_samples": [
21
27
"load_adata.py"
22
28
]
23
29
},
24
30
"research_agent": {
25
31
"prompt": "You are a specialist research agent. You fulfill user requests by finding and synthesizing information from reliable sources. You do not write code or delegate tasks.",
0 commit comments