diff --git a/fern/docs/pages/guides.mdx b/fern/docs/pages/guides.mdx index 8f29950..b854d1b 100644 --- a/fern/docs/pages/guides.mdx +++ b/fern/docs/pages/guides.mdx @@ -5,8 +5,9 @@ - [Fact checked information extraction with LLMs](guides/data-extraction) - Extract data from unstructured text and check that extracted data for factual consistency In the works: + - Simple chatbots - Multilingual chat - Generating customer support responses -[Contact us in Discord](support) if you have these or other use cases. We want to make sure you can build amazing LLM applications with Prediction Guard. +[Contact us in Discord](https://discord.gg/TFHgnhAFKd) if you have these or other use cases. We want to make sure you can build amazing LLM applications with Prediction Guard. diff --git a/fern/docs/pages/models.mdx b/fern/docs/pages/models.mdx index 79fabf5..112cdf8 100644 --- a/fern/docs/pages/models.mdx +++ b/fern/docs/pages/models.mdx @@ -3,4 +3,4 @@ - [Model Options](models/details) - We host a variety of the latest state-of-the-art LLMs in a privacy conserving manner. These models have a variety of strengths and capabilities. Look through these model details to see which of them might fit your use case. - [Prompt Formats](models/prompts) - You might be used to entering simple text prompts into systems like ChatGPT. However, when you utilize certain open access LLMs directly, you might want to follow a specific prompt format. These models are fine-tuned using prompt data, and if you match your prompt formats to that training data format then you can see boosts in performance. -[Contact us in Discord](support) if you are having issues finding the right model. We want to make sure you can build amazing LLM applications with Prediction Guard. +[Contact us in Discord](https://discord.gg/TFHgnhAFKd) if you are having issues finding the right model. We want to make sure you can build amazing LLM applications with Prediction Guard. diff --git a/fern/docs/pages/usingllms/accessing_llms.mdx b/fern/docs/pages/usingllms/accessing_llms.mdx index 0c5d127..6297d99 100644 --- a/fern/docs/pages/usingllms/accessing_llms.mdx +++ b/fern/docs/pages/usingllms/accessing_llms.mdx @@ -18,7 +18,7 @@ etc. However, a common theme is the usage of LLMs through a REST API, which is e - Provided by a third party service (OpenAI, Anthropic, Cohere, etc.) - Self-hosted in your own infrastructure or in an account you control with a -model hosting provider (Replicate, Baseten, etc.) + model hosting provider (Replicate, Baseten, etc.) - Self-hosted using a DIY model serving API (Flask, FastAPI, etc.) We will use [Prediction Guard](/) to call open @@ -29,10 +29,10 @@ Further, it will illustrate how companies can access a wide range of models In order to "prompt" an LLM via Prediction Guard (and eventually engineer prompts), you can use any of the following SDKs: -[Python](/docs/getting-started/sd-ks#pythonclient), -[Go](/docs/getting-started/sd-ks#goclient), -[Rust](/docs/getting-started/sd-ks#rustclient), -[JS](/docs/getting-started/sd-ks#jsclient), and +[Python](/sdk-docs/software-development-kits/sd-ks), +[Go](/sdk-docs/software-development-kits/sd-ks), +[Rust](/sdk-docs/software-development-kits/sd-ks), +[JS](/sdk-docs/software-development-kits/sd-ks), and [HTTP](/api-reference). We will use Python to show an example: @@ -79,28 +79,28 @@ print(json.dumps( The completions call should result in something similar to the following JSON output which includes the completion. -```json copy +````json copy { - "choices": [ - { - "index": 0, - "model": "Hermes-2-Pro-Llama-3-8B", - "status": "success", - "text": "2/1\n```\n2/1\n```\nIf you didn't understand, I'll explain it further. For a given denominator, 1/1 is the fraction that has the closest numerator to the greatest common multiple of the numerator and the denominator, because when reducing a fraction to its simplest terms, any common factors are canceled out, and the greatest common factor of the numerator and denominator is usually the best numerator, however in this case the numerator and denominator are 1 which have no" - } - ], - "created": 1720018377, - "id": "cmpl-7yX6KVwvUTPPqUM7H2Z4KNadDgEhI", - "object": "text_completion" + "choices": [ + { + "index": 0, + "model": "Hermes-2-Pro-Llama-3-8B", + "status": "success", + "text": "2/1\n```\n2/1\n```\nIf you didn't understand, I'll explain it further. For a given denominator, 1/1 is the fraction that has the closest numerator to the greatest common multiple of the numerator and the denominator, because when reducing a fraction to its simplest terms, any common factors are canceled out, and the greatest common factor of the numerator and denominator is usually the best numerator, however in this case the numerator and denominator are 1 which have no" + } + ], + "created": 1720018377, + "id": "cmpl-7yX6KVwvUTPPqUM7H2Z4KNadDgEhI", + "object": "text_completion" } -``` +```` ## Using The SDKs You can also try these examples using the other official SDKs: -[Python](/docs/getting-started/sd-ks#pythonclient), -[Go](/docs/getting-started/sd-ks#goclient), -[Rust](/docs/getting-started/sd-ks#rustclient), -[JS](/docs/getting-started/sd-ks#jsclient), +[Python](/sdk-docs/software-development-kits/sd-ks), +[Go](/sdk-docs/software-development-kits/sd-ks), +[Rust](/sdk-docs/software-development-kits/sd-ks), +[JS](/sdk-docs/software-development-kits/sd-ks), [HTTP](/api-reference) diff --git a/fern/docs/pages/usingllms/agents.mdx b/fern/docs/pages/usingllms/agents.mdx index afb6fdf..d6ba184 100644 --- a/fern/docs/pages/usingllms/agents.mdx +++ b/fern/docs/pages/usingllms/agents.mdx @@ -65,7 +65,7 @@ agent = initialize_agent(tools, PredictionGuard(model="Neural-Chat-7B"), agent.run("How are Domino's gift cards delivered?") ``` -This will verbosely log the agents activities until it reaching a final answer +This will verbosely log the agents activities until it reaching a final answer nd generates the response: ``` @@ -85,8 +85,8 @@ Domino's gift cards can be delivered electronically or physically, and can be us You can also try these examples using the other official SDKs: -[Python](/docs/getting-started/sd-ks#pythonclient), -[Go](/docs/getting-started/sd-ks#goclient), -[Rust](/docs/getting-started/sd-ks#rustclient), -[JS](/docs/getting-started/sd-ks#jsclient), +[Python](/sdk-docs/software-development-kits/sd-ks), +[Go](/sdk-docs/software-development-kits/sd-ks), +[Rust](/sdk-docs/software-development-kits/sd-ks), +[JS](/sdk-docs/software-development-kits/sd-ks), [HTTP](/api-reference) diff --git a/fern/docs/pages/usingllms/basic_prompting.mdx b/fern/docs/pages/usingllms/basic_prompting.mdx index bc2a06f..c9ffa7b 100644 --- a/fern/docs/pages/usingllms/basic_prompting.mdx +++ b/fern/docs/pages/usingllms/basic_prompting.mdx @@ -164,7 +164,7 @@ output on-the-fly to what we ideally want in the output. Although not always necessary (as seen above), few shot prompting generally produces better results than single shot prompting in terms of consistency and -similarity to your ideal outputs. +similarity to your ideal outputs. Let's reformat our sentiment prompt to include demonstrations: @@ -242,7 +242,7 @@ print(output) This will output the Hinglish response similar to: ``` - Wow, tumne mujhe bahut si baatein batayi hai. Mujhe laga tumhe yeh movie achchi lagi ho. Tumne kaha ki Lindsay Lohan bhot hi achchi acting ki hai. Tumne kaha ki tumhe yeh movie achchi lagi hai. Tumne kaha ki tumhe yeh movie achchi lagi hai. + Wow, tumne mujhe bahut si baatein batayi hai. Mujhe laga tumhe yeh movie achchi lagi ho. Tumne kaha ki Lindsay Lohan bhot hi achchi acting ki hai. Tumne kaha ki tumhe yeh movie achchi lagi hai. Tumne kaha ki tumhe yeh movie achchi lagi hai. ``` If you don't speak Hinglish, you can check out the translation using another prompt: @@ -273,8 +273,8 @@ Wow, you've told me a lot of things. I thought you'd like this movie. You said L You can also try these examples using the other official SDKs: -[Python](/docs/getting-started/sd-ks#pythonclient), -[Go](/docs/getting-started/sd-ks#goclient), -[Rust](/docs/getting-started/sd-ks#rustclient), -[JS](/docs/getting-started/sd-ks#jsclient), +[Python](/sdk-docs/software-development-kits/sd-ks), +[Go](/sdk-docs/software-development-kits/sd-ks), +[Rust](/sdk-docs/software-development-kits/sd-ks), +[JS](/sdk-docs/software-development-kits/sd-ks), [HTTP](/api-reference) diff --git a/fern/docs/pages/usingllms/chaining_retrieval.mdx b/fern/docs/pages/usingllms/chaining_retrieval.mdx index 2673fbe..0c3e8c7 100644 --- a/fern/docs/pages/usingllms/chaining_retrieval.mdx +++ b/fern/docs/pages/usingllms/chaining_retrieval.mdx @@ -589,8 +589,8 @@ RESPONSE: A single patch should solve one problem at a time. You can also try these examples using the other official SDKs: -[Python](/docs/getting-started/sd-ks#pythonclient), -[Go](/docs/getting-started/sd-ks#goclient), -[Rust](/docs/getting-started/sd-ks#rustclient), -[JS](/docs/getting-started/sd-ks#jsclient), +[Python](/sdk-docs/software-development-kits/sd-ks), +[Go](/sdk-docs/software-development-kits/sd-ks), +[Rust](/sdk-docs/software-development-kits/sd-ks), +[JS](/sdk-docs/software-development-kits/sd-ks), [HTTP](/api-reference) diff --git a/fern/docs/pages/usingllms/chat_completions.mdx b/fern/docs/pages/usingllms/chat_completions.mdx index 2851630..4d99918 100644 --- a/fern/docs/pages/usingllms/chat_completions.mdx +++ b/fern/docs/pages/usingllms/chat_completions.mdx @@ -124,8 +124,8 @@ while True: You can also try these examples using the other official SDKs: -[Python](/docs/getting-started/sd-ks#pythonclient), -[Go](/docs/getting-started/sd-ks#goclient), -[Rust](/docs/getting-started/sd-ks#rustclient), -[JS](/docs/getting-started/sd-ks#jsclient), +[Python](/sdk-docs/software-development-kits/sd-ks), +[Go](/sdk-docs/software-development-kits/sd-ks), +[Rust](/sdk-docs/software-development-kits/sd-ks), +[JS](/sdk-docs/software-development-kits/sd-ks), [HTTP](/api-reference) diff --git a/fern/docs/pages/usingllms/prompt_engineering.mdx b/fern/docs/pages/usingllms/prompt_engineering.mdx index 07ac426..a18fe2d 100644 --- a/fern/docs/pages/usingllms/prompt_engineering.mdx +++ b/fern/docs/pages/usingllms/prompt_engineering.mdx @@ -204,7 +204,7 @@ Try using multiple formulations of your prompt to either: - Provide multiple options to users; or - Create multiple candidate predictions, which you can choose from programmatically -using a reference free evaluation of those candidates. + using a reference free evaluation of those candidates. ```python copy template1 = """### Instruction: @@ -365,7 +365,7 @@ print("FACT SCORE:", fact_score['checks'][0]['score']) We might get this kind of output: ``` -COMPLETION: California is the smallest state in the United States. +COMPLETION: California is the smallest state in the United States. FACT SCORE: 0.12891793251037598 ``` @@ -413,8 +413,8 @@ The above will likely generate toxic output, but thanks to Prediction Guard, you You can also try these examples using the other official SDKs: -[Python](/docs/getting-started/sd-ks#pythonclient), -[Go](/docs/getting-started/sd-ks#goclient), -[Rust](/docs/getting-started/sd-ks#rustclient), -[JS](/docs/getting-started/sd-ks#jsclient), +[Python](/sdk-docs/software-development-kits/sd-ks), +[Go](/sdk-docs/software-development-kits/sd-ks), +[Rust](/sdk-docs/software-development-kits/sd-ks), +[JS](/sdk-docs/software-development-kits/sd-ks), [HTTP](/api-reference) diff --git a/fern/docs/pages/usingllms/streaming.mdx b/fern/docs/pages/usingllms/streaming.mdx index 193bb3f..5ce1e5b 100644 --- a/fern/docs/pages/usingllms/streaming.mdx +++ b/fern/docs/pages/usingllms/streaming.mdx @@ -73,7 +73,7 @@ for res in client.chat.completions.create( temperature=0.1, stream=True ): - + # Use 'end' parameter in print function to avoid new lines. print(res["data"]["choices"][0]["delta"]["content"], end='') ``` @@ -84,8 +84,8 @@ for res in client.chat.completions.create( You can also try these examples using the other official SDKs: -[Python](/docs/getting-started/sd-ks#pythonclient), -[Go](/docs/getting-started/sd-ks#goclient), -[Rust](/docs/getting-started/sd-ks#rustclient), -[JS](/docs/getting-started/sd-ks#jsclient), +[Python](/sdk-docs/software-development-kits/sd-ks), +[Go](/sdk-docs/software-development-kits/sd-ks), +[Rust](/sdk-docs/software-development-kits/sd-ks), +[JS](/sdk-docs/software-development-kits/sd-ks), [HTTP](/api-reference)