Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate and refactor configuration based on RAG Triad #523

Open
1 of 4 tasks
Lep06fg opened this issue May 2, 2024 · 1 comment
Open
1 of 4 tasks

Consolidate and refactor configuration based on RAG Triad #523

Lep06fg opened this issue May 2, 2024 · 1 comment
Assignees
Labels
Sprint 2 May 2 to May 22 2024

Comments

@Lep06fg
Copy link
Collaborator

Lep06fg commented May 2, 2024

As a RAG Experiment Accelerator user I would like to have a meaningful, hierarchy based config file structure
SO I would be able to easily understand the different features and settings which I can conduct experiments on.

Current config file structure

{
    "index_name_prefix": "idx",
    "experiment_name": "",
    "job_name": "",
    "job_description": "",
    "preprocess": false,
    "chunking": {
        "chunk_size": [1000],
        "overlap_size": [200],
        "generate_title": false,
        "generate_summary": false,
        "override_content_with_summary": false
    },
    "embedding_models": [
        {
            "type": "azure",
            "deployment_name": "text-embedding-ada-002"
        }
    ],
    "ef_construction": [400],
    "ef_search": [400],
    "language":{
        "analyzers": {
            "analyzer_name": "en.microsoft",
            "index_analyzer_name": "",
            "search_analyzer_name": "",
            "char_filters": [],
            "tokenizers": [],
            "token_filters": []
        },
        "query_language": "en-us"
    },
    "rerank": true,
    "rerank_type": "crossencoder",
    "llm_re_rank_threshold": 3,
    "cross_encoder_at_k": 4,
    "crossencoder_model": "cross-encoder/stsb-roberta-base",
    "search_types": [
        "search_for_manual_hybrid"
    ],
    "retrieve_num_of_documents": 5,
    "metric_types": [
        "cosine"
    ],
    "azure_oai_chat_deployment_name": "gpt-35-turbo",
    "azure_oai_eval_deployment_name": "gpt-35-turbo",
    "openai_temperature": 0,
    "search_relevancy_threshold": 0.8,
    "data_formats": "all",
    "eval_data_jsonl_file_path": "./artifacts/eval_data.jsonl",
    "chunking_strategy": "basic",
    "chain_of_thoughts": true,
    "hyde": "disabled",
    "query_expansion": false,
    "min_query_expansion_related_question_similarity_score": 90,
    "azure_document_intelligence_model": "prebuilt-read"
}

Desired config file structure

{
    "experiment": {
        "name": "",
        "job_name": "",
        "job_description": ""
    },
    "indexing": {
        "index_name_prefix": "idx",
        "data_formats": "all",
        "sampling": {
                "sample_data": "true",
                "sample_percentage": "10",
                "optimum_k": "auto",
                "min_cluster": "2",
                "max_cluster": "30",
         },
        "preprocess": false,
        "chunking": {
            "chunking_strategy": "basic",
            "chunk_size": [1000],
            "overlap_size": [200],
            "generate_title": false,
            "generate_summary": false,
            "override_content_with_summary": false,
            "azure_document_intelligence_model": "prebuilt-read"
        },
        "azure_search": {
            "hnsw": {
                "ef_construction": [400],
                "ef_search": [400]
            },
            "language":{
                "analyzers": {
                    "analyzer_name": "en.microsoft",
                    "index_analyzer_name": "",
                    "search_analyzer_name": "",
                    "char_filters": [],
                    "tokenizers": [],
                    "token_filters": []
                },
                "query_language": "en-us"
            }
        }
    },
    "embedding": {
        "embedding_models": [{
            "type": "azure",
            "deployment_name": "text-embedding-ada-002"
        }]
    },
    "retrieval": {
        "reranking": {
            "rerank": true,
            "rerank_type": "crossencoder",
            "llm_re_rank_threshold": 3,
            "cross_encoder_at_k": 4,
            "crossencoder_model": "cross-encoder/stsb-roberta-base"
        },
        "search_types": [
            "search_for_manual_hybrid"
        ],
        "max_num_of_documents": 5,
        "chain_of_thoughts": true,
        "hyde": "disabled",
        "query_expansion": {
            "enabled": false,
            "min_query_expansion_related_question_similarity_score": 90
        }
    },
    "generation": {
        "azure_oai_chat_deployment_name": "gpt-35-turbo",
        "openai_temperature": 0
    },
    "evaluation": {
        "metric_types": [
            "cosine"
        ],
        "azure_oai_eval_deployment_name": "gpt-35-turbo",
        "search_relevancy_threshold": 0.8,
        "eval_data_jsonl_file_path": "./artifacts/eval_data.jsonl"
    }
}

Tasks

Thoughtrs:

  • indexing.json (indexing, chunking, preprocess)
  • experimentation.json (querying, generation)
  • retrieval evaluation
  • generation evaluation.json (iterativly)
@Lep06fg Lep06fg added the Sprint 2 May 2 to May 22 2024 label May 2, 2024
@guybartal guybartal changed the title Consolidate and compare configuration based on RAG Triad Consolidate and refactor configuration based on RAG Triad May 12, 2024
@guybartal
Copy link
Collaborator

@ritesh-modi @shanepeckham @martinpeck @julia-meshcheryakova, could you please share your thoughts about this design for refactor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sprint 2 May 2 to May 22 2024
Projects
None yet
Development

No branches or pull requests

2 participants