|
| 1 | +## Case studies |
| 2 | + |
| 3 | +VueGen’s functionality is demonstrated through two case studies: |
| 4 | + |
| 5 | +**1. Predefined Directory** |
| 6 | + |
| 7 | +This introductory case study uses a predefined directory with plots, dataframes, Markdown, and HTML components. Users can generate reports in different formats and modify the configuration file to customize the report structure. |
| 8 | + |
| 9 | +🔗 [](https://colab.research.google.com/github/Multiomics-Analytics-Group/vuegen/blob/main/docs/vuegen_basic_case_study.ipynb) |
| 10 | + |
| 11 | +:::{NOTE} |
| 12 | +The [configuration file](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml) is available in the `docs/example_config_files` folder, and the [directory](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_data/Basic_example_vuegen_demo_notebook) with example data is in the `docs/example_data` folder. |
| 13 | +::: |
| 14 | + |
| 15 | + |
| 16 | +**2. Earth Microbiome Project Data** |
| 17 | + |
| 18 | +This advanced case study demonstrates the application of VueGen in a real-world scenario using data from the [Earth Microbiome Project (EMP)](https://earthmicrobiome.org/). The EMP is an initiative to characterize global microbial taxonomic and functional diversity. The notebook process the EMP data, create plots, dataframes, and other components, and organize outputs within a directory to produce reports. Report content and structure can be adapted by modifying the configuration file. Each report consists of sections on exploratory data analysis, metagenomics, and network analysis. |
| 19 | + |
| 20 | +🔗 [](https://colab.research.google.com/github/Multiomics-Analytics-Group/vuegen/blob/main/docs/vuegen_case_study_earth_microbiome.ipynb) |
| 21 | + |
| 22 | +:::{NOTE} |
| 23 | +The EMP case study is available online as [HTML](https://multiomics-analytics-group.github.io/vuegen/) and [Streamlit](https://earth-microbiome-vuegen-demo.streamlit.app/) reports. |
| 24 | +The [configuration file](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config) is available in the `docs/example_config_files` folder, and the [directory](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_data/Earth_microbiome_vuegen_demo_notebook) with example data is in the `docs/example_data` folder. |
| 25 | +::: |
| 26 | + |
| 27 | + |
| 28 | +**3. ChatBot Component** |
| 29 | + |
| 30 | +This case study highlights VueGen’s capability to embed a chatbot component into a report subsection, |
| 31 | +enabling interactive conversations inside the report. |
| 32 | + |
| 33 | +Two API modes are supported: |
| 34 | + |
| 35 | +- **Ollama-style streaming chat completion** |
| 36 | +If a `model` parameter is specified in the config file, VueGen assumes the chatbot is using Ollama’s [/api/chat endpoint](https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-chat-completion). |
| 37 | +Messages are handled as chat history, and the assistant responses are streamed in real time for a smooth and responsive experience. |
| 38 | +This mode supports LLMs such as `llama3`, `deepsek`, or `mistral`. |
| 39 | + |
| 40 | +:::{TIP} |
| 41 | +See [Ollama’s website](https://ollama.com/) for more details. |
| 42 | +::: |
| 43 | + |
| 44 | + |
| 45 | +- **Standard prompt-response API** |
| 46 | +If no `model` is provided, VueGen uses a simpler prompt-response flow. |
| 47 | +A single prompt is sent to an endpoint, and a structured JSON object is expected in return. |
| 48 | +Currently, the response can include: |
| 49 | + - `text`: the main textual reply |
| 50 | + - `links`: a list of source URLs (optional) |
| 51 | + - `HTML content`: an HTML snippet with a Pyvis network visualization (optional) |
| 52 | + |
| 53 | +This response structure is currently customized for an internal knowledge graph assistant, but VueGen is being actively developed |
| 54 | +to support more flexible and general-purpose response formats in future releases. |
| 55 | + |
| 56 | +:::{NOTE} |
| 57 | +You can see a [configuration file example](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Chatbot_example_config.yaml) for the chatbot component in the `docs/example_config_files` folder. |
| 58 | +::: |
0 commit comments