Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/langchain/evals/3land/solana_3land_create_collection.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { runEvals } from "../utils/runEvals";

const THREELAND_CREATE_COLLECTION_DATASET = [
{
inputs: {
query: `Create a 3.land NFT collection named 'My3LandCollection' with symbol=3LD, description='test desc', mainnet=false`
},
referenceOutputs: {
tool: "3land_minting_tool_collection",
response: JSON.stringify({
isMainnet: false,
collectionSymbol: "3LD",
collectionName: "My3LandCollection",
collectionDescription: "test desc",
mainImageUrl: ""
}),
},
},
];

runEvals(THREELAND_CREATE_COLLECTION_DATASET, "3land_minting_tool_collection eval");
28 changes: 28 additions & 0 deletions src/langchain/evals/3land/solana_3land_create_single.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { runEvals } from "../utils/runEvals";

const THREELAND_CREATE_SINGLE_DATASET = [
{
inputs: {
query: `Create an NFT single listing in the collection EAKm4 with name 'Artz', itemSymbol 'ART', itemAmount=10, price=1.5 SOL, traits=[{trait_type:'color', value:'blue'}], isMainnet=false, withPool=true, poolName='myPool', splHash='So11111111111111111111111111111111111111112'`
},
referenceOutputs: {
tool: "3land_minting_tool_single",
response: JSON.stringify({
collectionAccount: "EAKm4",
itemName: "Artz",
itemSymbol: "ART",
itemAmount: 10,
itemDescription: "",
traits: [{ trait_type: "color", value: "blue" }],
price: 1.5,
mainImageUrl: "",
isMainnet: false,
withPool: true,
poolName: "myPool",
splHash: "So11111111111111111111111111111111111111112"
}),
},
},
];

runEvals(THREELAND_CREATE_SINGLE_DATASET, "3land_minting_tool_single eval");
32 changes: 32 additions & 0 deletions src/langchain/evals/adrena/solana_close_perp_trade.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { runEvals } from "../utils/runEvals";

const CLOSE_PERP_TRADE_DATASET = [
{
inputs: {
query: "Close my long perp trade on Adrena at price=100, tradeMint=5Ci1rbbB2v1zYsa2p8XR8wRr1pb2kqeNydDnvHqpbAzE"
},
referenceOutputs: {
tool: "solana_close_perp_trade",
response: JSON.stringify({
tradeMint: "5Ci1rbbB2v1zYsa2p8XR8wRr1pb2kqeNydDnvHqpbAzE",
price: 100,
side: "long"
}),
},
},
{
inputs: {
query: "Close a short perp trade on Adrena with tradeMint=9AdRL8zJhLoB9EKE2f8jNDTuKYh1XaSh1yr8vK6crbBP at price=150"
},
referenceOutputs: {
tool: "solana_close_perp_trade",
response: JSON.stringify({
tradeMint: "9AdRL8zJhLoB9EKE2f8jNDTuKYh1XaSh1yr8vK6crbBP",
price: 150,
side: "short"
}),
},
},
];

runEvals(CLOSE_PERP_TRADE_DATASET, "solana_close_perp_trade eval");
36 changes: 36 additions & 0 deletions src/langchain/evals/adrena/solana_open_perp_trade.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { runEvals } from "../utils/runEvals";

const OPEN_PERP_TRADE_DATASET = [
{
inputs: {
query: "Open a long perp trade on Adrena with collateral=1.5 USDC, tradeMint=5Ci1rbbB2v1zYsa2p8XR8wRr1pb2kqeNydDnvHqpbAzE, leverage=50000, side=long"
},
referenceOutputs: {
tool: "solana_open_perp_trade",
response: JSON.stringify({
collateralAmount: 1.5,
collateralMint: "5Ci1rbbB2v1zYsa2p8XR8wRr1pb2kqeNydDnvHqpbAzE",
tradeMint: "5Ci1rbbB2v1zYsa2p8XR8wRr1pb2kqeNydDnvHqpbAzE",
leverage: 50000,
side: "long"
}),
},
},
{
inputs: {
query: "Open a short perp trade on Adrena with collateral=0.2 USDC, tradeMint=7q2KV9FWwZfQcdC1GFHxP3H6NDthxtvmzGzHsbtUFbtZ, leverage=100000"
},
referenceOutputs: {
tool: "solana_open_perp_trade",
response: JSON.stringify({
collateralAmount: 0.2,
collateralMint: "7q2KV9FWwZfQcdC1GFHxP3H6NDthxtvmzGzHsbtUFbtZ",
tradeMint: "7q2KV9FWwZfQcdC1GFHxP3H6NDthxtvmzGzHsbtUFbtZ",
leverage: 100000,
side: "short"
}),
},
},
];

runEvals(OPEN_PERP_TRADE_DATASET, "solana_open_perp_trade eval");
26 changes: 26 additions & 0 deletions src/langchain/evals/agent/create_image.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { runEvals } from "../utils/runEvals";

const CREATE_IMAGE_DATASET = [
{
inputs: {
query:
"Generate me an image of a Solana logo but with the colors red white and blue",
},
referenceOutputs: {
tool: "solana_create_image",
response: "Solana logo but with the colors red white and blue",
},
},

{
inputs: {
query: "Can you produce an image of a cat playing the piano?",
},
referenceOutputs: {
tool: "solana_create_image",
response: "A cat playing the piano.",
},
},
];

runEvals(CREATE_IMAGE_DATASET, "Create image tests");
24 changes: 24 additions & 0 deletions src/langchain/evals/agent/get_info.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { runEvals } from "../utils/runEvals";

const GET_INFO_DATASET = [
{
inputs: {
query: "What is the latest news about Solana DeFi protocols?",
},
referenceOutputs: {
tool: "solana_get_info",
response: "Latest Solana DeFi protocols", // the search query may be different and wont be an exact match
},
},
{
inputs: {
query: "Search for quantum computing",
},
referenceOutputs: {
tool: "solana_get_info",
response: "quantum computing", // the search query may be different and wont be an exact match
},
},
];

runEvals(GET_INFO_DATASET, "Get info tests");
24 changes: 24 additions & 0 deletions src/langchain/evals/agent/wallet_address.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { runEvals } from "../utils/runEvals";

const WALLET_ADDRESS_DATASET = [
{
inputs: {
query: "What's your wallet address?",
},
referenceOutputs: {
tool: "solana_get_wallet_address",
response: "{}",
},
},
{
inputs: {
query: "Where can I send tokens? Show me your address",
},
referenceOutputs: {
tool: "solana_get_wallet_address",
response: "{}",
},
},
];

runEvals(WALLET_ADDRESS_DATASET, "Get wallet address tests");
15 changes: 15 additions & 0 deletions src/langchain/evals/alldomains/solana_get_all_tlds.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { runEvals } from "../utils/runEvals";

const GET_ALL_TLDS_DATASET = [
{
inputs: {
query: "Which TLDs exist on AllDomains?"
},
referenceOutputs: {
tool: "solana_get_all_tlds",
response: "{}",
},
},
];

runEvals(GET_ALL_TLDS_DATASET, "solana_get_all_tlds eval");
16 changes: 16 additions & 0 deletions src/langchain/evals/alldomains/solana_get_owned_domains.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { runEvals } from "../utils/runEvals";

const GET_OWNED_DOMAINS_DATASET = [
{
inputs: {
query:
"Show me all the domains owned by wallet GZbQmKYYzwjP3nbdqRWPLn98ipAni9w5eXMGp7bmZbGB",
},
referenceOutputs: {
tool: "solana_get_owned_domains",
response: "GZbQmKYYzwjP3nbdqRWPLn98ipAni9w5eXMGp7bmZbGB",
},
},
];

runEvals(GET_OWNED_DOMAINS_DATASET, "solana_get_owned_domains eval");
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { runEvals } from "../utils/runEvals";

const GET_OWNED_TLD_DOMAINS_DATASET = [
{
inputs: {
query: "Show me all .blink domains I own"
},
referenceOutputs: {
tool: "solana_get_owned_tld_domains",
response: "blink",
},
},
{
inputs: {
query: "List my .bonk domains"
},
referenceOutputs: {
tool: "solana_get_owned_tld_domains",
response: "bonk",
},
},
];

runEvals(GET_OWNED_TLD_DOMAINS_DATASET, "solana_get_owned_tld_domains eval");
24 changes: 24 additions & 0 deletions src/langchain/evals/alldomains/solana_resolve_all_domains.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { runEvals } from "../utils/runEvals";

const RESOLVE_ALL_DOMAINS_DATASET = [
{
inputs: {
query: "Resolve domain mydomain.blink to a pubkey"
},
referenceOutputs: {
tool: "solana_resolve_all_domains",
response: "mydomain.blink",
},
},
{
inputs: {
query: "Find the owner of spamm.bonk"
},
referenceOutputs: {
tool: "solana_resolve_all_domains",
response: "spamm.bonk",
},
},
];

runEvals(RESOLVE_ALL_DOMAINS_DATASET, "solana_resolve_all_domains eval");
15 changes: 15 additions & 0 deletions src/langchain/evals/allora/solana_allora_get_all_topics.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { runEvals } from "../utils/runEvals";

const ALLORA_GET_ALL_TOPICS_DATASET = [
{
inputs: {
query: "Get all topics from Allora"
},
referenceOutputs: {
tool: "solana_allora_get_all_topics",
response: "{}",
},
},
];

runEvals(ALLORA_GET_ALL_TOPICS_DATASET, "solana_allora_get_all_topics eval");
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { runEvals } from "../utils/runEvals";

const ALLORA_GET_INFERENCE_BY_TOPIC_ID_DATASET = [
{
inputs: {
query: "Get the inference for topic id 42 from Allora"
},
referenceOutputs: {
tool: "solana_allora_get_inference_by_topic_id",
response: "42",
},
},
];

runEvals(ALLORA_GET_INFERENCE_BY_TOPIC_ID_DATASET, "solana_allora_get_inference_by_topic_id eval");
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { runEvals } from "../utils/runEvals";

const ALLORA_GET_PRICE_INFERENCE_DATASET = [
{
inputs: {
query: "Get the 5m price inference for BTC from Allora"
},
referenceOutputs: {
tool: "solana_allora_get_price_inference",
response: JSON.stringify({
tokenSymbol: "BTC",
timeframe: "5m"
}),
},
},
];

runEvals(ALLORA_GET_PRICE_INFERENCE_DATASET, "solana_allora_get_price_inference eval");
15 changes: 15 additions & 0 deletions src/langchain/evals/debridge/get_supported_chains.eval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { runEvals } from "../utils/runEvals";

const GET_SUPPORTED_CHAINS_DATASET = [
{
inputs: {
query: "Which chains are supported by the deBridge DLN protocol?",
},
referenceOutputs: {
tool: "get_supported_chains",
response: "{}",
},
},
];

runEvals(GET_SUPPORTED_CHAINS_DATASET, "get_supported_chains eval");
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { runEvals } from "../utils/runEvals";

const DEBRIDGE_CHECK_STATUS_DATASET = [
{
inputs: {
query: "Check the status of my cross chain transaction 0x1234567890ABCDEF"
},
referenceOutputs: {
tool: "check_bridge_status",
response: JSON.stringify({
txHashOrOrderId: "0x1234567890ABCDEF"
}),
},
},
{
inputs: {
query: "Check the status of solana signature 4rgN7S9Ev8SBRyZCgcMpe1hwsfztCDUh6QWHRJdJmTgoz3gUrZ4eSgkpzLVma2gk2EcQ2fK1Bx46UNsGPZNV9xAD"
},
referenceOutputs: {
tool: "check_bridge_status",
response: JSON.stringify({
txHashOrOrderId: "4rgN7S9Ev8SBRyZCgcMpe1hwsfztCDUh6QWHRJdJmTgoz3gUrZ4eSgkpzLVma2gk2EcQ2fK1Bx46UNsGPZNV9xAD"
}),
},
},
];

runEvals(DEBRIDGE_CHECK_STATUS_DATASET, "check_bridge_status eval");
Loading
Loading