Giter VIP home page Giter VIP logo

Comments (3)

billmetangmo avatar billmetangmo commented on September 23, 2024

Suite: https://www.loom.com/share/1e9a3bc65f194caaa26c9350e0b5eb50

from tchoung-te.

billmetangmo avatar billmetangmo commented on September 23, 2024

Use backtesting with pairwise: https://www.youtube.com/watch?v=3cDtDI2W-xA

Le code utilisé pour construire le dataset:

from datetime import datetime, timedelta, timezone

from langsmith import Client
from langsmith.beta import convert_runs_to_test

# How we are sampling runs to include in our test
end_time = datetime.now(tz=timezone.utc)
start_time = end_time - timedelta(days=14)
project_name="tchoung-te"
run_filter = f'and(gt(start_time, "{start_time.isoformat()}"), lt(end_time, "{end_time.isoformat()}"))'


# Fetch the runs we want to convert to a test
client = Client()

prod_runs = list(
    client.list_runs(
        project_name=project_name,
        execution_order=1,
        filter=run_filter,
    )
)

# Name of the dataset we want to create
dataset_name = f'{project_name}-backtesting {start_time.strftime("%Y-%m-%d")}-{end_time.strftime("%Y-%m-%d")}'
# This converts the runs to a dataset + test
# It does not actually invoke your model
convert_runs_to_test(
    prod_runs,
    # Name of the resulting dataset
    dataset_name=dataset_name,
    # Whether to include the run outputs as reference/ground truth
    include_outputs=True,
    # Whether to include the full traces in the resulting test project
    # (default is to just include the root run)
    load_child_runs=True,
)

from tchoung-te.

billmetangmo avatar billmetangmo commented on September 23, 2024

Ajouter à hub: https://docs.smith.langchain.com/old/cookbook/hub-examples/retrieval-qa-chain

from tchoung-te.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.