SGP Python Client¶
The official Python client for Scale's Scale GenAI Platform.
Note: This is the documentation for the SGP Python Client. If you are looking for the SGP REST API, please check out the REST API Documentation.
What is SGP?¶
Generative AI applications are transforming the modern enterprise. However, building these applications can be challenging and expensive, especially when they need to conform to enterprise security and scalability requirements. Scale SGP APIs provide the full-stack capabilities enterprises need to rapidly develop and deploy Generative AI applications for custom use cases. These capabilities include loading custom data sources, indexing data into vector stores, running inference, executing agents, and robust evaluation features.
Key Features¶
Retrieval¶
In order to customize generative AI model to use custom data rather than just the data it was trained on, you need to be able to retrieve data from your own data sources. SGP provides a simple, flexible, and powerful way to retrieve data from your own data sources.
Completion¶
SGP provides a single interface for running inference on your generative AI models whether they are open source models, closed source models, or custom models you've trained yourself. These completion APIs include interfaces for agents, chat completions, and standard text completions.
Custom Models¶
Optimizing generative AI performance consists of several steps (as shown below).
Notice that one of the largest performance gains comes from fine-tuning the model on your use-case specific data. SGP provides a simple, flexible, and powerful way to fine-tune embedding, reranking, and LLM models on your own data.
Evaluation¶
The python SDK currently offers a simple, flexible, and powerful way to evaluate your generative AI models. The SDK allows you create evaluation datasets, define your own evaluation questions, and then run evaluations on your models.
Test cases within a dataset can be added and modified, but historical tests are never deleted. The history of each evaluation is also preserved on a per-test case basis, allowing you to track the performance of your models over time, not just on the dataset as a whole, but for select test cases as well.