From 39d4b2c1849432910a8ed593acd332cb59097d03 Mon Sep 17 00:00:00 2001 From: Chandra Irugalbandara Date: Fri, 13 Sep 2024 20:29:57 +0000 Subject: [PATCH] updated the docs folder structure --- docs/_sidebar.md | 37 ++++++++++++------- .../large-language-model.md | 0 docs/{ => building-blocks}/methods.md | 0 docs/{ => building-blocks}/semantic-type.md | 0 docs/{ => building-blocks}/tools.md | 0 docs/{ => building-blocks}/with-llm.md | 0 .../citation.md} | 0 .../contributors.md} | 0 docs/community/projects.md | 0 docs/community/social-media.md | 0 docs/faq.md | 11 ++++++ docs/{ => guides}/best-practices.md | 0 docs/guides/tutorials.md | 3 ++ docs/{ => quick-start}/installation.md | 0 docs/{ => quick-start}/minimum-example.md | 0 15 files changed, 37 insertions(+), 14 deletions(-) rename docs/{ => building-blocks}/large-language-model.md (100%) rename docs/{ => building-blocks}/methods.md (100%) rename docs/{ => building-blocks}/semantic-type.md (100%) rename docs/{ => building-blocks}/tools.md (100%) rename docs/{ => building-blocks}/with-llm.md (100%) rename docs/{community-tutorials.md => community/citation.md} (100%) rename docs/{customisability.md => community/contributors.md} (100%) create mode 100644 docs/community/projects.md create mode 100644 docs/community/social-media.md rename docs/{ => guides}/best-practices.md (100%) create mode 100644 docs/guides/tutorials.md rename docs/{ => quick-start}/installation.md (100%) rename docs/{ => quick-start}/minimum-example.md (100%) diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 9e244fa..a186330 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -1,22 +1,31 @@ - Quick Start - - [Installation](installation.md) - - [Minimum Working Example](minimum-example.md) + - [Installation](quick-start/installation.md) + - [Minimum Working Example](quick-start/minimum-example.md) - Building Blocks - - [Semantic Type](semantic-type.md) - - [Large Language Model](large-language-model.md) - - [With LLM](with-llm.md) - - [Tools](tools.md) - - [Methods](methods.md) -- Guide - - [Best Practices](best-practices.md) - - [Community Tutorials](community-tutorials.md) + - [Semantic Type](building-blocks/semantic-type.md) + - [Large Language Model](building-blocks/large-language-model.md) + - [With LLM](building-blocks/with-llm.md) + - [Tools](building-blocks/tools.md) + - [Methods](building-blocks/methods.md) +- Guides + - [Best Practices](guides/best-practices.md) + - [Tutorials](guides/tutorials.md) - API Reference - - [semantix](semantix.md) - - [llms](llms.md) - - [types](types.md) - - [utils](utils.md) + - [semantix](api-ref/semantix.md) + - LLMs + - [OpenAI](api-ref/openai.md) + - [Anthropic](api-ref/anthropic.md) + - [Cohere](api-ref/cohere.md) + - [TogetherAI](api-ref/togetherai.md) + - [types](api-ref/types.md) + - [utils](api-ref/utils.md) +- Community + - [Projects](community/projects.md) + - [Contributors](community/contributors.md) + - [Citation](community/citation.md) + - [Social Media](community/social-media.md) - [Roadmap](roadmap.md) - [FAQ](faq.md) - [Contributing](contributing.md) diff --git a/docs/large-language-model.md b/docs/building-blocks/large-language-model.md similarity index 100% rename from docs/large-language-model.md rename to docs/building-blocks/large-language-model.md diff --git a/docs/methods.md b/docs/building-blocks/methods.md similarity index 100% rename from docs/methods.md rename to docs/building-blocks/methods.md diff --git a/docs/semantic-type.md b/docs/building-blocks/semantic-type.md similarity index 100% rename from docs/semantic-type.md rename to docs/building-blocks/semantic-type.md diff --git a/docs/tools.md b/docs/building-blocks/tools.md similarity index 100% rename from docs/tools.md rename to docs/building-blocks/tools.md diff --git a/docs/with-llm.md b/docs/building-blocks/with-llm.md similarity index 100% rename from docs/with-llm.md rename to docs/building-blocks/with-llm.md diff --git a/docs/community-tutorials.md b/docs/community/citation.md similarity index 100% rename from docs/community-tutorials.md rename to docs/community/citation.md diff --git a/docs/customisability.md b/docs/community/contributors.md similarity index 100% rename from docs/customisability.md rename to docs/community/contributors.md diff --git a/docs/community/projects.md b/docs/community/projects.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/community/social-media.md b/docs/community/social-media.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/faq.md b/docs/faq.md index e69de29..7023088 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -0,0 +1,11 @@ +# FAQ + +### Whats the Difference between `semantix` and other libraries such as `DSPy`, `Instructor` etc? + +Libraries such as `DSPy`, `Instructor` etc. are JSON Schema based Structured Output Generators. Though they are powerful, they come with few caveats. + +1. Uses PyDantic Models. Though pydantic provide robust type validation, uses have to extend all the types to `BaseModel` which is not always necessary. +2. Unnecessary Abstractions. Libraries like `DSPy` uses unnecessary abstractions to embed meaning into variables (`InputField`, `OutputField` etc). Classes like `dspy.Signature` are not necessary because already python function signatures, type hints and output type hints are expressive enough to convey the objective. +3. In most LLMs, characters such as `{`, `}`, `:`, `"` etc are considered as seperate tokens. So in the inference you will be charged for each of these tokens alot because JSON Schema are heavily composed of these characters. + +`Semantix` on the other hand uses `Semantic` types to embed meaning into variables. `Semantic` types are just a wrapper around the original type and a string that represents the meaning of the type. This allows you to write more expressive, powerful code with ease without any use of unnecessary abstractions. and it is not a must as well. You can use `Semantic` types only when you need to embed meaning into variables. diff --git a/docs/best-practices.md b/docs/guides/best-practices.md similarity index 100% rename from docs/best-practices.md rename to docs/guides/best-practices.md diff --git a/docs/guides/tutorials.md b/docs/guides/tutorials.md new file mode 100644 index 0000000..c2c8070 --- /dev/null +++ b/docs/guides/tutorials.md @@ -0,0 +1,3 @@ +# Tutorials + +Submissions to the tutorials section are welcome. Please refer to the [contributing guidelines](contributing.md) for more information. diff --git a/docs/installation.md b/docs/quick-start/installation.md similarity index 100% rename from docs/installation.md rename to docs/quick-start/installation.md diff --git a/docs/minimum-example.md b/docs/quick-start/minimum-example.md similarity index 100% rename from docs/minimum-example.md rename to docs/quick-start/minimum-example.md