---
# System prepended metadata

title: 提示格式

---

## 提示格式
根據使用的語言模型不同，使用不同的格式來下指令可以得到更好的結果，akasha目前提供 ***gpt***, ***llama***, ***chat_gpt***, ***chat_mistral***等格式



#### gpt 

```text!


prompt_format = System: {system_prompt} \n\n {history_messages} \n\n Human: {prompt}

```



#### llama

```text!


prompt_format = [INST] <<SYS>>  {system_prompt} \n\n <<SYS>> {history_messages} \n\n  {prompt} [\INST]

```


#### chat_gpt
```text!


prompt_format = [{"role":"system", "content": {system_prompt} },
{"role":"user", "content": {history msg1}},
{"role":"assistant", "content": {history msg2}},
.
.
.
{"role":"user", "content": {prompt}}

```


#### chat_mistral
```text!


prompt_format = [{"role":"user", "content": "start conversation" },
{"role":"assistant", "content": {system_prompt}},
{"role":"user", "content": {history msg1}},
{"role":"assistant", "content": {history msg2}},
.
.
.
{"role":"user", "content": {prompt}}

```


### Example

```python!=
import akasha
sys_prompt = "請用中文回答"
prompt = "五軸是甚麼?"
qa = akasha.Doc_QA(
    verbose=False, 
    search_type="svm", 
    model="openai:gpt-3.5-turbo")

response = qa.get_response(
        doc_path="docs/mic/",
        prompt=prompt,
        prompt_format_type="chat_gpt",
        system_prompt=sys_prompt,
)
```


### Example2
```python!=
import akasha
sys_prompt = "請用中文回答"
prompt = "五軸是甚麼?"
input_text = akasha.prompts.format_sys_prompt(sys_prompt,prompt,"chat_gpt")
model_obj = akasha.handle_model("openai:gpt-3.5-turbo",False,0.0)

response = akasha.call_model(model_obj, input_text)

```

