Case studies#

VueGen’s functionality is demonstrated through various case studies:

1. Predefined Directory#

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.

🔗 Open in Colab

Note

The configuration file is available in the docs/example_config_files folder, and the directory with example data is in the docs/example_data folder.

2. Earth Microbiome Project Data#

This advanced case study demonstrates the application of VueGen in a real-world scenario using data from the Earth Microbiome Project (EMP). 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.

🔗 Open in Colab

Note

The EMP case study is available online as HTML and Streamlit reports. The configuration file is available in the docs/example_config_files folder, and the directory with example data is in the docs/example_data folder.

3. APICall Component#

This case study focuses on the APICall component, which enables interaction with external APIs by using HTTP methods such as GET and POST. The retrieved data is displayed in the report, allowing users to integrate external data sources into their anlyses. This component is restricted to Streamlit reports.

🔗 Open in Colab

Note

A configuration file example for the apicall component is available in the docs/example_config_files folder.

4. ChatBot Component#

This case study highlights VueGen’s capability to embed a chatbot component into a report subsection, enabling interactive conversations inside the report. This component is streamlit-specific and is not available for other report types.

🔗 Open in Colab

Two API modes are supported:

  • Ollama-style streaming chat completion: If a model parameter is specified in the config file, VueGen assumes the chatbot is using Ollama’s /api/chat endpoint. Messages are handled as chat history, and the assistant responses are streamed in real time for a smooth and responsive experience. This mode supports LLMs such as llama3, deepsek, or mistral.

Tip

See Ollama’s website for more details.

  • Standard prompt-response API: If no model is provided, VueGen uses a simpler prompt-response flow. A single prompt is sent to an endpoint, and a structured JSON object is expected in return. Currently, the response can include:

    • text: the main textual reply

    • links: a list of source URLs (optional)

    • HTML content: an HTML snippet with a Pyvis network visualization (optional)

This response structure is currently customized for an internal knowledge graph assistant, but VueGen is being actively developed to support more flexible and general-purpose response formats in future releases.

Note

A configuration file example for the chatbot component is available in the docs/example_config_files folder.