File size: 14,956 Bytes
6fae7e2
 
 
 
 
 
 
 
 
 
 
1afb9ca
 
6fae7e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
577870e
 
 
 
 
 
 
 
 
 
 
3e0f8f8
 
 
 
 
 
 
 
 
 
6fae7e2
 
 
 
 
 
 
 
 
 
 
577870e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
import os
import dotenv

dotenv.load_dotenv()


if os.getenv("DEBUG_MODE") == "True":
    LLM_COUNCIL_MEMBERS = {
        "Smalls": [
            "together://meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
            "together://meta-llama/Llama-3.2-3B-Instruct-Turbo",
            "anthropic://claude-3-haiku-20240307",
            "openai://gpt-4o-mini",
        ],
        "Flagships": [
            "together://meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
            "together://meta-llama/Llama-3.2-3B-Instruct-Turbo",
            "anthropic://claude-3-haiku-20240307",
        ],
    }
else:
    LLM_COUNCIL_MEMBERS = {
        "Smalls": [
            "openai://gpt-4o-mini",
            "together://meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
            "together://meta-llama/Llama-3.2-3B-Instruct-Turbo",
            "vertex://gemini-1.5-flash-001",
            "anthropic://claude-3-haiku-20240307",
        ],
        "Flagships": [
            "openai://gpt-4o",
            "together://meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo",
            "vertex://gemini-1.5-pro-002",
            "anthropic://claude-3-5-sonnet",
        ],
        "OpenAI": [
            "openai://gpt-4o",
            "openai://gpt-4o-mini",
        ],
    }

PROVIDER_TO_AVATAR_MAP = {
    "openai://gpt-4o-mini": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIwLjk5ZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjU2IDI2MCI+PHBhdGggZD0iTTIzOS4xODQgMTA2LjIwM2E2NC43MiA2NC43MiAwIDAgMC01LjU3Ni01My4xMDNDMjE5LjQ1MiAyOC40NTkgMTkxIDE1Ljc4NCAxNjMuMjEzIDIxLjc0QTY1LjU4NiA2NS41ODYgMCAwIDAgNTIuMDk2IDQ1LjIyYTY0LjcyIDY0LjcyIDAgMCAwLTQzLjIzIDMxLjM2Yy0xNC4zMSAyNC42MDItMTEuMDYxIDU1LjYzNCA4LjAzMyA3Ni43NGE2NC42NyA2NC42NyAwIDAgMCA1LjUyNSA1My4xMDJjMTQuMTc0IDI0LjY1IDQyLjY0NCAzNy4zMjQgNzAuNDQ2IDMxLjM2YTY0LjcyIDY0LjcyIDAgMCAwIDQ4Ljc1NCAyMS43NDRjMjguNDgxLjAyNSA1My43MTQtMTguMzYxIDYyLjQxNC00NS40ODFhNjQuNzcgNjQuNzcgMCAwIDAgNDMuMjI5LTMxLjM2YzE0LjEzNy0yNC41NTggMTAuODc1LTU1LjQyMy04LjA4My03Ni40ODNtLTk3LjU2IDEzNi4zMzhhNDguNCA0OC40IDAgMCAxLTMxLjEwNS0xMS4yNTV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41LS41LS41aC0uNzZhMS4yIDEuMiAwIDAgMC0uMjEgMWguOTdjLjI4IDAgLjUtLjIyLjUtLjUiLz48cGF0aCBmaWxsPSIjZjNhZDYxIiBkPSJNMjguOTkxIDI4aC0xLjk5djEuNjhjMCAuMTcuMTQuMzEuMzEuMzFoMS4zN2MuMTcgMCAuMzEtLjE0LjMxLS4zMXptLTE2Ljk5IDBoLTEuOTl2MS42OWMtLjAxLjE3LjEzLjMxLjMuMzFoMS4zN2MuMTggMCAuMzItLjE0LjMyLS4zMXptNS4wODggMmwtMS4zOTgtLjAxYy0uMTcgMC0uMzQtLjA1LS4zOC0uMjJsLS40OS0xLjc3aDIuMDU0bC40MzYgMS42MmMuMDQuMTctLjAyLjM3OC0uMjE2LjM4em0yLjI4OCAwYS4zMTMuMzEzIDAgMCAxLS4yNzYtLjQ1bC41OTUtMS41NWgyLjRsLS45MzUgMS42M2EuOTUuOTUgMCAwIDEtLjc0Mi4zN3oiLz48L2c+PC9zdmc+",
    "anthropic://claude-3-haiku-20240307": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTE3LjMwNCAzLjU0MWgtMy42NzJsNi42OTYgMTYuOTE4SDI0Wm0tMTAuNjA4IDBMMCAyMC40NTloMy43NDRsMS4zNy0zLjU1M2g3LjAwNWwxLjM2OSAzLjU1M2gzLjc0NEwxMC41MzYgMy41NDFabS0uMzcxIDEwLjIyM0w4LjYxNiA3LjgybDIuMjkxIDUuOTQ1WiIvPjwvc3ZnPg==",
}

LLM_TO_UI_NAME_MAP = {
    "openai://gpt-4o-mini": "GPT-4 Turbo Mini",
    "anthropic://claude-3-5-sonnet": "Claude 3 Sonnet",
    "vertex://gemini-1.5-flash-001": "Gemini 1.5 Flash",
    "together://meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo": "Llama 3.1 8B Instruct",
    "together://meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo": "Llama 3.1 70B Instruct",
    "together://meta-llama/Llama-3.2-3B-Instruct-Turbo": "Llama 3.2 3B Instruct",
    "anthropic://claude-3-haiku-20240307": "Claude 3 Haiku",
}

if os.getenv("DEBUG_MODE") == "True":
    AGGREGATORS = ["together://meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"]
else:
    AGGREGATORS = [
        "anthropic://claude-3-haiku-20240307",
        "together://meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
        "together://meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo",
        "together://meta-llama/Llama-3.2-3B-Instruct-Turbo",
        "openai://gpt-4o",
        "openai://gpt-4o-mini",
    ]

# Fix the aggregator step.
# Add a judging step.
# Add visualizations.


# import streamlit as st
# from components import llm_council_selector

# st.title("LLM Council Selector")

# selected_models = llm_council_selector()

# if selected_models is not None:
#     st.write("Selected Models:", selected_models)
# else:
#     st.write("No models selected or component didn't return a value.")


# Choose your council.
# Pre-selected.
#    Smalls: GPT-4o-mini, llama-3.1-70b, qwen-2.0-70b
#    Flagships: GPT-4o, llama-3.1-405b, qwen-2.0-110b, gemini, claude-3.5-sonnet
#    Best: chatgpt-4o-latest, gemini-1.5-pro-exp-0827, grok-2-2024-08-13, claude-3-5-sonnet-20240620, llama-3.1-405b-instruct
# Custom:
#    Choose from a list of available models.
# All:
#    All available models.

# Choose aggregator.
# Aggregators are models proficient in synthesizing responses from other models into a single, highquality output. An effective aggregator should maintain or enhance output quality even when
# integrating inputs that are of lesser quality than its own.
# Choices:
#   - 4o-latest
#   - gemini-1.5
#   - grok-2
#   - claude-3.5-sonnet
#   - llama-3.1-405b-instruct

# Provide a prompt. (Or pre-canned prompts.)
# Paste chat history.

# Checkbox, enable judging.
#
# If checked, Judging config:
# Single sided
#   Provide criteria. (or default).
# If pairwise, choose granularity (or default).
#   Choose criteria. (or default).
#   Enable position swapping?

# Go button.
# Sections.
# 1. Model outputs.
# 2. Aggregated output.
# 3. Judging underneath each output.
#  Highlight in green, the output that was best, as determined by council.
#  Show graph breakdown of scores and justifications. (by criteria, # wins and # losses)
#  Show final overall score.
#  Highlight in red, the output that was worst, as determined by council.
# Judging section.
#   Show agreement matrix.
#   Show bar graph of self-bias.
#   Plot contrarianism vs. conviction (scatter plot)
#   Show per-judge scores.

# Calculate total cost.
# Show total tokens used.

# """
# type: [single, pairwise]

# [single]
# - criteria:
#     - name
#     - weight
#     - description
#     - scoring


# [pairwise]
# - granularity: [fine, coarse]
# - ties_allowed: [yes, no]
# - position_swapping: [yes, no]
# - reference_model: [model_name]
# - criteria:
#     - name
#     - weight
#     - description
# """