llama-stack-mirror/docs/source/building_applications/playground/index.md
Kelly Brown b096794959
Some checks failed
SqlStore Integration Tests / test-postgres (3.13) (push) Failing after 2s
Integration Tests / discover-tests (push) Successful in 2s
Vector IO Integration Tests / test-matrix (3.12, inline::milvus) (push) Failing after 17s
Integration Auth Tests / test-matrix (oauth2_token) (push) Failing after 19s
Python Package Build Test / build (3.12) (push) Failing after 14s
Test Llama Stack Build / build-custom-container-distribution (push) Failing after 14s
Vector IO Integration Tests / test-matrix (3.12, remote::pgvector) (push) Failing after 15s
SqlStore Integration Tests / test-postgres (3.12) (push) Failing after 20s
Unit Tests / unit-tests (3.13) (push) Failing after 15s
Test Llama Stack Build / generate-matrix (push) Successful in 16s
Vector IO Integration Tests / test-matrix (3.13, remote::pgvector) (push) Failing after 20s
Test External Providers / test-external-providers (venv) (push) Failing after 17s
Update ReadTheDocs / update-readthedocs (push) Failing after 15s
Test Llama Stack Build / build-single-provider (push) Failing after 21s
Test Llama Stack Build / build-ubi9-container-distribution (push) Failing after 18s
Unit Tests / unit-tests (3.12) (push) Failing after 22s
Vector IO Integration Tests / test-matrix (3.12, inline::sqlite-vec) (push) Failing after 25s
Vector IO Integration Tests / test-matrix (3.13, remote::chromadb) (push) Failing after 23s
Vector IO Integration Tests / test-matrix (3.13, inline::milvus) (push) Failing after 26s
Vector IO Integration Tests / test-matrix (3.13, inline::sqlite-vec) (push) Failing after 19s
Vector IO Integration Tests / test-matrix (3.12, inline::faiss) (push) Failing after 28s
Vector IO Integration Tests / test-matrix (3.13, inline::faiss) (push) Failing after 21s
Vector IO Integration Tests / test-matrix (3.12, remote::chromadb) (push) Failing after 23s
Python Package Build Test / build (3.13) (push) Failing after 44s
Test Llama Stack Build / build (push) Failing after 25s
Integration Tests / test-matrix (push) Failing after 46s
Pre-commit / pre-commit (push) Successful in 2m24s
docs: Reorganize documentation on the webpage (#2651)
# What does this PR do?
Reorganizes the Llama stack webpage into more concise index pages,
introduce more of a workflow, and reduce repetition of content.

New nav structure so far based on #2637 

Further discussions in
https://github.com/meta-llama/llama-stack/discussions/2585

**Preview:**
![Screenshot 2025-07-09 at 2 31
53 PM](https://github.com/user-attachments/assets/4c1f3845-b328-4f12-9f20-3f09375007af)

You can also build a full local preview locally 

 **Feedback**
Looking for feedback on page titles and general feedback on the new
structure

**Follow up documentation**
I plan on reducing some sections and standardizing some terminology in a
follow up PR.
More discussions on that in
https://github.com/meta-llama/llama-stack/discussions/2585
2025-07-15 14:19:35 -07:00

4.5 KiB

Llama Stack Playground

The Llama Stack Playground is currently experimental and subject to change. We welcome feedback and contributions to help improve it.

The Llama Stack Playground is an simple interface which aims to:

  • Showcase capabilities and concepts of Llama Stack in an interactive environment
  • Demo end-to-end application code to help users get started to build their own applications
  • Provide an UI to help users inspect and understand Llama Stack API providers and resources

Key Features

Playground

Interactive pages for users to play with and explore Llama Stack API capabilities.

Chatbot
.. video:: https://github.com/user-attachments/assets/8d2ef802-5812-4a28-96e1-316038c84cbf
    :autoplay:
    :playsinline:
    :muted:
    :loop:
    :width: 100%
  • Chat: Chat with Llama models.
    • This page is a simple chatbot that allows you to chat with Llama models. Under the hood, it uses the /inference/chat-completion streaming API to send messages to the model and receive responses.
  • RAG: Uploading documents to memory_banks and chat with RAG agent
    • This page allows you to upload documents as a memory_bank and then chat with a RAG agent to query information about the uploaded documents.
    • Under the hood, it uses Llama Stack's /agents API to define and create a RAG agent and chat with it in a session.
Evaluations
.. video:: https://github.com/user-attachments/assets/6cc1659f-eba4-49ca-a0a5-7c243557b4f5
    :autoplay:
    :playsinline:
    :muted:
    :loop:
    :width: 100%
  • Evaluations (Scoring): Run evaluations on your AI application datasets.
    • This page demonstrates the flow evaluation API to run evaluations on your custom AI application datasets. You may upload your own evaluation datasets and run evaluations using available scoring functions.
    • Under the hood, it uses Llama Stack's /scoring API to run evaluations on selected scoring functions.
.. video:: https://github.com/user-attachments/assets/345845c7-2a2b-4095-960a-9ae40f6a93cf
    :autoplay:
    :playsinline:
    :muted:
    :loop:
    :width: 100%
  • Evaluations (Generation + Scoring): Use pre-registered evaluation tasks to evaluate an model or agent candidate

    • This page demonstrates the flow for evaluation API to evaluate an model or agent candidate on pre-defined evaluation tasks. An evaluation task is a combination of dataset and scoring functions.
    • Under the hood, it uses Llama Stack's /eval API to run generations and scorings on specified evaluation configs.
    • In order to run this page, you may need to register evaluation tasks and datasets as resources first through the following commands.
      $ llama-stack-client datasets register \
      --dataset-id "mmlu" \
      --provider-id "huggingface" \
      --url "https://huggingface.co/datasets/llamastack/evals" \
      --metadata '{"path": "llamastack/evals", "name": "evals__mmlu__details", "split": "train"}' \
      --schema '{"input_query": {"type": "string"}, "expected_answer": {"type": "string"}, "chat_completion_input": {"type": "string"}}'
    
    $ llama-stack-client benchmarks register \
    --eval-task-id meta-reference-mmlu \
    --provider-id meta-reference \
    --dataset-id mmlu \
    --scoring-functions basic::regex_parser_multiple_choice_answer
    
Inspect
.. video:: https://github.com/user-attachments/assets/01d52b2d-92af-4e3a-b623-a9b8ba22ba99
    :autoplay:
    :playsinline:
    :muted:
    :loop:
    :width: 100%
  • API Providers: Inspect Llama Stack API providers

    • This page allows you to inspect Llama Stack API providers and resources.
    • Under the hood, it uses Llama Stack's /providers API to get information about the providers.
  • API Resources: Inspect Llama Stack API resources

    • This page allows you to inspect Llama Stack API resources (models, datasets, memory_banks, benchmarks, shields).
    • Under the hood, it uses Llama Stack's /<resources>/list API to get information about each resources.
    • Please visit Core Concepts for more details about the resources.

Starting the Llama Stack Playground

To start the Llama Stack Playground, run the following commands:

  1. Start up the Llama Stack API server
llama stack build --template together --image-type conda
llama stack run together
  1. Start Streamlit UI
uv run --with ".[ui]" streamlit run llama_stack/distribution/ui/app.py