Mikey-Chen
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 壓瘡結案文件 ## 專案概要 此專案的目標為壓瘡指引,附件一為有辦法訓練與辨認出來的CQ問題,也就是說當使用者問的問題有符合「CQ的guideline 」時,AI可以跑出按鈕模組供使用者選擇,選擇「是」且傳出後,就可以得到從 Fuseki 取回來的 guideline 各項數據,但是當使用者問的問題不符合或是A I無法判斷該問題是否與「CQ的guideline」 相近時,則會跑出查無結果,所以例如詢問:「@第三級壓瘡是什麼」,AI 並無法判斷這與其中哪一個「CQ的guideline」重合,所以才會跑出查無結果,但經過我們幾次改版後,我們可以確定的是 AI 有辦法進行除了不回傳「CQ的guideline」的問答,也就是當使用者詢問:「第三級壓傷是什麼」,AI會略過回傳CQ guideline ,直接與使用者進行問答,例如:「第三級壓瘡是皮膚損傷的一種程度,通常與組織壞死有關…..等等」,藉此我們可以實現有效的對答。 ## 所使用到的框架 <div id = "ChatGPT"></div> ### Chat GPT turbo 3.5 API 本專案中所有使用到的 AI 機器人邏輯判斷皆採用 Chat GPT turbo 3.5 API ,通過強大的自然語言理解和生成功能,使得專案能夠提供高質量的對話互動,且有效提供了對話生成和自然語言理解的功能以便滿足用戶的需求並解決問題,以下是它在專案中的功能介紹: * **對話生成**: ChatGPT Turbo 3.5 API 能夠根據用戶的輸入生成自然流暢的對話回應,使得與用戶的互動更加自然和有意義。 通過對話生成,用戶可以提出問題、尋求建議或解決方案,而 ChatGPT Turbo 3.5 API 能夠根據已有的知識和語境生成相應的回答。 * **問題回答**: 當用戶提出問題時,ChatGPT Turbo 3.5 API 能夠理解問題的含義並給出相應的答案。 它能夠處理各種類型的問題,包括常見問題、技術問題、醫療問題等,並生成準確、清晰的回答。 * **知識儲存和檢索**: ChatGPT Turbo 3.5 API 能夠儲存和檢索大量的知識,以便在用戶提問時快速查找相關信息並生成回應。 這些知識可以包括文本、圖像、連結等各種形式,從而使得對話回答更加豐富和全面。 * **語言理解**: 通過先進的自然語言處理技術,ChatGPT Turbo 3.5 API 能夠理解用戶提出的問題或輸入的內容,從中提取關鍵信息並生成相應的回答。 它能夠處理不同類型的語言結構和語境,從而實現更加準確和靈活的對話生成。 :::success 智能對話引擎,負責根據用戶提問提供相關的壓瘡相關知識和建議。 ::: ### LINEBOT LINEBOT 扮演了處理用戶輸入和生成回應的關鍵角色,LINEBOT 通過處理用戶輸入和生成回應,實現了與用戶之間的即時交互和溝通,為專案提供了對話介面和功能,以下是 LINEBOT 在專案中的功能詳細介紹: * **用戶輸入處理**: LINEBOT 能夠接收用戶通過 LINE 平台發送的文本訊息。 它能夠解析用戶輸入的文本,並提取關鍵信息,以便後續的處理和回應生成。 * **對話生成和回應**: 當收到用戶的輸入後,LINEBOT 會根據預定義的邏輯和規則生成相應的回應。 這些回應可以是事先定義好的固定回應,也可以是根據用戶輸入動態生成的對話。 * **自然語言處理**: LINEBOT 可以利用自然語言處理技術對用戶輸入進行理解和分析。 它能夠識別用戶提出的問題、要求或指令,並生成相應的回答或執行相關的操作。 * **資料儲存和管理**: LINEBOT 可以儲存和管理用戶的對話記錄和相關資料,以便後續的分析和使用。 它能夠將用戶的問題、回答和其他相關信息保存在數據庫或其他存儲介質中,以供需要時查詢和使用。 * **錯誤處理和異常情況處理**: LINEBOT 能夠處理用戶輸入的錯誤或不合法的情況,並給出相應的提示或指導。 它能夠識別並處理各種可能的異常情況,如無法理解的輸入、系統錯誤等,以確保用戶體驗的流暢性和穩定性。 :::success 作為一個介面,通過 LINE 平台提供與用戶互動的渠道,接收用戶的壓瘡相關問題並轉發至智能對話引擎進行回答。 ::: ### Fuseki Fuseki 是一個基於 Apache Jena 的 SPARQL 端點服務器,主要用於存儲和查詢RDF數據。在這個專案中,Fuseki 的功能是作為 RDF 圖形數據庫,用於存儲壓瘡相關的知識圖譜數據。它負責接收和處理由 ChatGPT Turbo 3.5 發出的 SPARQL 查詢,並返回相應的知識圖譜數據,從而為 ChatGPT 提供必要的信息來回答用戶的問題。Fuseki 在此專案中扮演著知識圖譜數據庫的角色,支持知識檢索和查詢功能,以提供準確和全面的知識回答。 :::success 作為一個本體資料庫,存儲與壓瘡相關的知識圖譜資料,並提供 SPARQL 查詢服務供智能對話引擎檢索。 ::: ### Django Django 在這個專案中,負責構建和管理 LINEBOT 的後端服務,提供處理用戶請求和回應的功能。其主要功能包括: * 路由和視圖:Django 使用 URL 配置文件來路由 HTTP 請求到相應的視圖函數,從而處理用戶的各種請求,如消息傳遞、按鈕點擊等。 * 數據庫管理:Django 提供了強大的 ORM(對象關係映射)工具,用於管理數據庫。在這個專案中,Django 可以與 Fuseki 整合,從 RDF 圖形數據庫中獲取相應的知識數據。 * 模型和管理後台:Django 的模型層允許定義數據模型,並提供了一個管理後台界面,用於管理數據庫中的內容。這對於管理用戶對話歷史等數據非常有用。 * 處理用戶請求:Django 可以輕鬆處理用戶通過 LINEBOT 發送的各種請求,包括文字消息、按鈕點擊等,並作出相應的回應。 * 整合第三方應用程序:Django 允許輕鬆整合第三方應用程序,例如 LINE Messaging API,以實現與 LINE 平台的通信和集成。 :::success 作為後端框架,負責處理用戶的 HTTP 請求,調用相應的視圖函數並與其他元件進行交互,實現 LineBot 的各項功能。 ::: ## 功能說明 ### Guideline查詢模式-詢問時加上「@」: 詢問時在開頭加上「@」,即可幫使用者查詢最符合輸入關鍵字的結果,結果只會輸出一項,若該結果是你需要的,可以點擊「是」,機器人會回傳條文資訊,並可進行後續問答,反之,點擊「否」,重新輸入問題。 ![截圖 2024-05-09 下午3.19.19](https://hackmd.io/_uploads/BJ7Wte9zA.png) ### 一般聊天問答模式-詢問時不加「@」: 選定主題後可以直接進行一問一答的方式提問,通常主軸都會圍繞在使用者一開始選定的主題。 ![截圖 2024-05-09 下午3.26.20](https://hackmd.io/_uploads/rJdo5e9GC.png) ![截圖 2024-05-09 下午3.25.16](https://hackmd.io/_uploads/rktw9xcfC.png) ## 安裝說明 <a href="https://docs.google.com/presentation/d/1v9ej3iu6e3Ag57H5T3he0RsfT-ItGpXp/edit?usp=sharing&ouid=102748839400727043231&rtpof=true&sd=true">安裝說明簡報(要先有老師的共用資料夾權限)</a> 專案套件可以直接引入requirements.txt,並啟動虛擬環境即可 此外也要開啟fuseki server才能進行RDF搜尋 如果是使用老師的電腦啟動伺服器,則只需要覆寫views.py內容及輸入OpenAI API KEY即可。 ## 問題與討論 ### Q1.完成回傳多個按鈕訊息框 #### A: 在開發過程中,原本根據提示文字回傳的查詢結果是JSON格式 ```python= {'label':'','guildline':''} ``` * 預期改寫方式: 變為類似二維陣列的邏輯下去跑,然後改寫後續算法內容。 但實測到目前為止有時候會出現不相干的「多個」無意義資訊顯示在畫面中,因為它要如何搜尋是我們無法控制的。 :::info 總結以上,我們決定採用原本的單一問題按鈕形式,是的話就可以繼續問答,否的話就重新輸入問題,那就要請使用者再描述得詳細點。(可參考於[**功能介紹區**](##功能說明)) ::: ### Q2a.可以對應正確guideline,透過guideline可以往下問裡面內容 #### A: 參考於[**ChatGPT 功能簡介**](###ChatGPT),簡單來說 AI 能夠分析並判斷的內容僅限與附件一中的 CQ question guideline,透過 ChatGPT 組成正確的 SQL 句子供 Fuseki 查詢,並以指定JSON格式回傳查詢資料。若查詢成功即可往下進行一問一答。 ### Q2b.分級與特徵可以交互查詢 #### A: 目前我們輸入給機器人的**專業資料**只有[**附件一**](##附件一)的Guideline內容,沒有其他書籍中的重點資訊。因此在這裡的問答跟直接在官網ChatGPT上的問答結果是一樣的。但就算我們可以給它所有該章節的重點資訊,會產生以下兩個問題: 1. 無法確保機器人會給出我們最想要的回應,這牽涉到LLM演算法的不確定性,我們只能用prompt盡量微調。 3. 書本的重點資訊一定非常龐大,不可能就單純簡單幾句話而已,因此若將這些資料都輸入進ChatGPT會產生龐大的Token,除了它可能無法接收這麼大量的資料以外,Call API的成本也會變得非常大,故此方法有些不切實際。 ## 附件一 ### 文獻中的 CQ 問題統整 CQ1.1 What factors put individuals at risk for pressure injury development? CQ1.2 What are the unique pressure injury risk factors to consider for special populations (if any)? CQ1.3 What are accurate and effective methods for pressure injury risk assessment? CQ2.1 Are scale/ tools effective methods to assess the skin and soft tissue? CQ2.2 What are effective methods of assessing erythema? CQ2.3 Is ultrasound an effective method for assessing the skin and soft tissue? CQ2.4 Is evaluation of skin and tissue moisture an effective method of assessing the skin and soft tissue? CQ2.5 Is evaluation of skin and tissue temperature an effective method of assessing the skin and soft tissue? CQ2.6 What additional technologies are accurate and effective methods of assessing skin and soft tissue? CQ2.7 What methods are effective for assessing skin and soft tissue in individuals with darkly pigmented skin? CQ3.1 Is massage effective in preventing pressure injuries? CQ3.2 Are topical products effective in preventing pressure injuries? CQ3.3 Are prophylactic dressings effective for preventing pressure injuries? CQ3.4 Are continence management strategies effective in preventing and treating pressure injuries? CQ3.5 Are low friction or microclimate control fabrics effective for preventing pressure injuries? CQ4.1 What are accurate and effective methods for assessing nutritional status of individuals with or at risk of pressure injuries? CQ4.2 What nutritional interventions are effective in preventing pressure injuries? CQ4.3 Is there an ideal nutritional regimen to reduce the risk of pressure injuries, and if so, what should it include? CQ4.4 Are any nutritional supplements (e.g. formulas, specific vitamins/minerals) effective in reducing risk of pressure injury development? CQ4.5 What nutritional interventions are effective in supporting pressure injury healing? CQ4.6 Is there an optimal nutritional regimen to promote healing of pressure injuries, and if so, what should it include? CQ4.7 Are any specific oral nutritional supplements or formula effective in promoting healing of pressure injuries? CQ4.8 Nutrition for Neonates and children CQ5.1 How often should repositioning be performed to reduce the risk of pressure injuries? CQ5.2 What criteria should be used to determine and monitor frequency of turning? CQ5.3 What positioning techniques are most effective in redistributing pressure and preventing shear? CQ5.4 Do programs of early mobilization affect pressure injury rates? CQ5.5 For Spinal cord. CQ5.6 For critical ill. CQ5.7 For Operating room/Surgery. CQ6.1 What factors put individuals at risk for heel pressure injury development? CQ6.2 What are accurate and effective methods for assessing heel skin and tissue? CQ6.3 What are effective local management strategies (e.g., skin care, prophylactic dressings) in preventing heel pressure injuries? CQ6.4 What heel repositioning interventions are effective in preventing heel pressure injuries? CQ6.5 What support surfaces and devices are effective in preventing heel pressure injuries? CQ6.6 What are effective strategies for treating heel pressure injuries? CQ6.7 What factors affect healing of heel pressure injuries? CQ7.1 What reactive support surfaces are effective in preventing pressure injuries? CQ7.2 What active support surfaces are effective in preventing pressure injuries? CQ7.3 When should an active support surface be used to prevent pressure injuries? CQ7.4 What is the most effective seating support surface for preventing pressure injuries? CQ7.5 What reactive support surfaces are effective in supporting pressure injury healing? CQ7.6 What active support surfaces are effective in supporting pressure injury healing? CQ7.7 When should an active support surface be used to support pressure injury healing? CQ7.8 What is the most effective seating support surface for healing pressure injuries? CQ7.9 Support Surface Use During Transportation. CQ7.10 For Obesity. CQ7.11 For Surgery. CQ8.1 What factors should be considered when selecting and fitting a medical device? CQ8.2 What local management strategies are effective in preventing MDRPIs? CQ8.3 Is a prophylactic dressing effective for preventing MDRPIs? If so, what factors should be considered when selecting a prophylactic dressing?

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully