When importing a wallet from private key or seed phrase, how do you guess the correct address format

I am building a bitcoin wallet, i can derive addresses using the derivation paths. how do i determine the derivation path for the seed when importing it.