> For the complete documentation index, see [llms.txt](https://docs.humanchain.network/whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.humanchain.network/whitepaper/fundamentals/3.-applications/3.6-llm-wrappers.md).

# 3.6 LLM Wrappers

Not just limited to LLMs but any AI model will have an interface and the interface needs to ensure that certain inputs such as financial information, personally identifiable sensitive information, prompts which are a direct violation of regulations, etc. are not sent to the LLM or GenAI models. \
\
On the other hand, companies need to ensure that outputs that are highly sensitive or classified or secure information aren't shown or disclosed to users such as nuclear capabilities, synthetic biology, virology, etc. \
\
A safe and compliant LLM or GenAI wrapper could leverage HumanChain for prompt detection, prompt enhancement, data privacy preservation, model training, response sanitization, and constant updation of sensitive input prompts or sequences of prompts.

**How it works:**

1. **Standardization:** Wrappers provide a consistent interface for interacting with various LLMs, regardless of their underlying architecture or API. This allows developers to use different models without rewriting the code.
2. **Abstraction:** They handle low-level communication details with the LLM, like authentication and API calls. Developers can focus on crafting prompts and processing responses.
3. **Enhanced Functionality:** Wrappers can offer additional features on top of the core LLM functionality. These might include:

* Conversation Management: Tracking conversation history for context-aware responses in chatbots.
* Memory Management: Storing and retrieving past interactions for a more coherent user experience.
* Prompt Engineering: Assisting with crafting effective prompts to get the desired output from the LLM.

**Value propositions:**&#x20;

1. **Data Protection:** Wrappers can effectively filter sensitive information like financial data, PII, or trade secrets from being sent to the LLM, protecting user privacy and company assets.
2. **Compliance Adherence:** They can be programmed to prevent prompts or outputs that violate regulations, such as those related to discrimination, hate speech, or copyright infringement.
3. **Output Filtering:** Wrappers can filter sensitive or confidential information generated by the LLM, preventing accidental disclosure.
4. **Model Guidance:** They can provide additional context or constraints to the LLM, improving the quality and relevance of outputs.
5. **Performance Optimization:** By managing input and output, wrappers can help optimize LLM performance and reduce costs.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.humanchain.network/whitepaper/fundamentals/3.-applications/3.6-llm-wrappers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
